intent: check if a directory exists and create it if necessary
rewritten_intent: check if a directory `path` exists and create it if necessary
snippet: try:
      os.makedirs(path)
  except OSError:
      if (not os.path.isdir(path)):
          raise