code: private File validateOutputDirectory(File outputDirectory) {
          // Create output directory
          if (!outputDirectory.mkdir() && !outputDirectory.exists()) {
              throw new ArchiveExportException("Unable to create archive output directory - " + outputDirectory);
          }
          if (outputDirectory.isFile()) {
              throw new IllegalArgumentException("Unable to export exploded directory to "
                  + outputDirectory.getAbsolutePath() + ", it points to a existing file");
          }
  
          return outputDirectory;
      }
docs: Initializes the output directory
  
  @param baseDirectory
  @param directoryName
  @return