public Path newDirectory() throws IOException {
    Path path = Files.createTempDirectory(null);
    directories.add(path);
    return path;
  }
Creates a new temporary directory.

@return the path to the temporary directory
@throws IOException if creating the directory fails
jib-core/src/main/java/com/google/cloud/tools/jib/filesystem/TempDirectoryProvider.java