code: public File getAndMakeDirectory(final String param) {
      final File f = get(param, new StringToFile(),
          new AlwaysValid<File>(), "existing or creatable directory");
  
      if (f.exists()) {
        if (f.isDirectory()) {
          return f.getAbsoluteFile();
        } else {
          throw new ParameterValidationException(fullString(param), f
              .getAbsolutePath().toString(),
              new ValidationException("Not an existing or creatable directory"));
        }
      } else {
        f.getAbsoluteFile().mkdirs();
        return f.getAbsoluteFile();
      }
    }
docs: Gets a directory which is guaranteed to exist after the execution of this method.  If the
  directory does not already exist, it and its parents are created. If this is not possible, an
  exception is throws.