Added base source file for saveReport functions.
Implemented saving of text files from main window.