Check input line count in HDF5 data layer

The HDF5 data layer tries to read input files even if there are none, causing a segmentation fault. This check makes sure that doesn't happen.