renaming files to have correct extension