Clean up I/O

This PR eliminates some unnecessary code in the I/O routines.

I did this while considering whether we should switch to using numpy.savetxt() for our ascii output, as I suspect it would be much faster.  But I didn't implement anything like that; the file format is unchanged by this PR.