fix UnicodeDecodeError if path contains fancy chars