-- William Gibson, All Tomorrow's Parties
Here's that ditto wrapper script I mentioned.
Re-wrote it this morning as I had no Internet access (I'm at Steve's, in Plattsburgh, for his wedding) and therefore actually got work done. Funny how that works.
The comments at the top explain it all pretty well, I think.
Now to see if it actually works in production. The tests were fine.