code: def mkdir(path, owner='root', group='root', perms=0o555, force=False):
      
      log("Making dir {} {}:{} {:o}".format(path, owner, group,
                                            perms))
      uid = pwd.getpwnam(owner).pw_uid
      gid = grp.getgrnam(group).gr_gid
      realpath = os.path.abspath(path)
      path_exists = os.path.exists(realpath)
      if path_exists and force:
          if not os.path.isdir(realpath):
              log("Removing non-directory file {} prior to mkdir()".format(path))
              os.unlink(realpath)
              os.makedirs(realpath, perms)
      elif not path_exists:
          os.makedirs(realpath, perms)
      os.chown(realpath, uid, gid)
      os.chmod(realpath, perms)
docs: Create a directory