Two bugfixes:

When io_files = 1, log(0) was freaking out.  Fixed with a max(...,1).

There was a bug in the range computation that didn't come up when
i = 0, as it does when the number of threads is less than or equal
to the number of files.