paths don't have NULL bytes, so I can just check if a NULL byte is in the string and this starts working with Python 2.7 finally.