Substantially improved I/O handling.

I'm afraid this is a slightly breaking commit, as has been my recent
wont. Given the abject paucity of repository subscribers, however, I
feel confident in not terribly caring much. (Hopefully, this changes
with the ebbing of Spring thaw.)