code: function createDirectory(directory) {
    if (!directory) {
      throw new Error('A directory must be passed to be created.');
    }
    const statObject = getStatObject(directory);
    if (statObject && statObject.isFile()) {
      throw new Error(`The directory to create '${directory}' is a file.`);
    }
    fse.ensureDirSync(directory);
  }
docs: Creates a directory, if it doesn't exist already.
  @param directory the directory to create.
  @throws WrongDirException if the directory to create exists and is a file.