Fixed a bug where saving a document with the save name it's currently
open with causes weird and stupid behaviour.