Rename submitted files when a new codename is generated

Should resolve #557
What happens if there's an exception raised here?