Fix Bug 313485 - Improper message shows up when renamed a file with
some unsaved change.

When a unsaved file is being renamed, a dialog will show up asking
user to save and close the unsaved file.