fix UnicodeDecodeError if path contains fancy chars, supersedes #148