Oops, the backslashes were still eaten up by Postgres. Guess I should
have stuck the script into new-file-storage instead, as I just notice
Arjun said he did for his version. Sorry...
I compared our two scripts very briefly. Both have some good and bad
things that the other doesn't have, but I doubt it really matters,
they both probably work fine. (And of course, using daemontools is a
better solution anyway.)
(Since it wasn't clear to me where to put it, I didn't bother uploading
my version to new-file-storage. Somebody holler if you want it, but
just grabbing Arjun's should be fine.)