Fix handling of already open h5 files

Error when attempting to use Parse button, no h5file attribute has been
created on first use. Created Any Trait for h5file, default is None.
Finish migrating spectrum writing method