Path encode files in rename. fix #2846