Fix os.path.isdir() for non-ascii names