code: protected File assertDirectory(String dirName, String locName) {
          File d = new File(dirName);
          if (d.isFile())
              throw new LocationException("Path must reference a directory", MessageFormat.format(BootstrapConstants.messages.getString("error.specifiedLocation"), locName,
                                                                                                  d.getAbsolutePath()));
          return d;
      }
docs: Ensure that the given directory either does not yet exists,
  or exists as a directory.
  
  @param dirName
  Name/path to directory
  @param locName
  Symbol/location associated with directory
  @return File for directory location
  @throws LocationException
  if dirName references an existing File (isFile).