Ensure all file objects are closed when reading/writing HDF5, and in HDF5 tests.
Merge pull request #677 from astrofrog/io/fix-hdf5-open-fileobj

Ensure all file objects are closed when reading/writing HDF5