Added setClear calls to update the dirty state of the GUI when undo is called up to the last saved state.

Undo stack is now cleared when a new file is opened.

Fixed minor bug: In saveFile, native separators weren't used so file could show up in the recent file list twice with different separators.