Fix local file for upload detection when renaming temp files