Ask for renaming file if it already exists

User is required to rename the uploaded or created file if
it already exists. The rule is suitable for all file formats now.
Before it only works for ".grace" file. If the new file name has
no extension, then the old extension will be added.