This patch uses os.sep.encode() and os.sep.encode('utf-8') ... is there a reason for having these 2 variants?