This change ensures the file extension is added when renaming

It gets left off when you're creating the new file.