Fix a bug to handle backslash in copy.

Stefan Mark provided the fix.