Ensure HDF file is read correctly, amend unit test for file listing, and minor syntax cleanup

Trap gdal.Open as it doesn't report file I/O errors (e.g. non-existent file).
Check for at least one file in JSON list, rather than a specific number.
Replace 'if <x> in <dict>.keys()' idiom with 'if <x> in <dict>'.