Better way to check if a document is saved

Previous way of checking was checking if the name of the file; but it
could exist a saved document whose name contains the word “Untitled”
Merge pull request #3 from thebaz/master

Check if the document has been saved, not by seeing if the name contains Untitled, from @thebaz