Rename submitted files when a new codename is generated

Should resolve #557
Might this be better done (less repeated code) with a regular expression?