Fix file handle/line ending issues so that tests pass on Windows

Running ```ant clean jars test``` on Windows should now pass; without these changes, there would have been a handful of failures in the ```formats-gpl``` and ```formats-common``` components.  Once merged, this should be a step towards making ```BIOFORMATS-5.1-latest-win``` green.

/cc @rleigh-dundee