Bug fixes

Various bug fixes to the QSTEM/Master to make it workable while C++
refactor is under development.  Fixes file overwriting and other IO
issues mostly.