Fixed os.path.isdir