Support a large number of files (and some other quick bugfixes)

I was running into [this](http://nco.sourceforge.net/nco.html#Large-Numbers-of-Files) well documented problem.

The easiest way to test new "large number of files" support is to add a  `raises OSError("foo")` line below line 63 and see the DEBUG commands the tests give out. They do indeed use the "large number of files" code and pass (sorry I didn't write better tests).

The other changes are just things I ran into when running the tests in my dev environment.  All tests passing for me here.