Added check on close for whether the current file has been saved, as
well as a Keylistener which sets a boolean (isSaved) to be false when
the user has typed something. I'm bad at commit messages!