This generally looks like the right patch. I'm going to go ahead and pull it in.
One question still stands out to me, though - is using the system default encoding appropriate in this case (as 'contents.decode()' does), or are the files PURELIB and PLATLIB guaranteed to be ASCII, or is there some encoding that these files will always be?
After reading a little more carefully, I see that PURELIB and PLATLIB are directories containing files (of course) and the files being opened are .pth files. I'm going to punt and assume that the system default encoding is good enough until we find a case where the default encoding is not good enough.