def METHOD_NAME(path):
  if options.test or os.path.exists(path): return
  # Make sure parent exists
  parent, child = os.path.split(os.path.normpath(path))
  if parent and parent != path: METHOD_NAME(parent)
  # Create directory with correct permissions and group
  os.mkdir(path, options.dperms)
  if options.group: os.lchown(path, -1, grp.getgrnam(options.group)[2])