Add testing for the logFileWriter system

Adds some testing so stupid things aren't done.  Painful testing
is but worth it because of working code.
Fix bug in open_file logic
Add more tests to the test logic
incremental stuff is still broken... sigh