Update permissions of temp file to match that of original file.