Miscellaneous MEGHDF5 fixes and addition of tests.
This will create a new commit in order to revert the existing changes.