Improve naming of xml recording files. Add unit tests
Pretty big refactoring. Move dependency on parser to tsh only.
Easier flow of messages.
Also, fixed bug where recorder tried to save file even when it was off.