code: public static File ensureDir(String path, String name) throws IOException {
  		if((path == null) || (path.length() == 0)) {
  			throw new IOException("No configuration for (" + name + ")");
  		}
  		File dir = new File(path);
  		if(dir.exists()) {
  			if(!dir.isDirectory()) {
  				throw new IOException("Dir(" + name + ") at (" + path + 
  						") exists but is not a directory!");
  			}
  		} else {
  			if(!dir.mkdirs()) {
  				throw new IOException("Unable to create dir(" + name +") at ("
  						+ path + ")");
  			}
  		}
  		return dir;
  	}
docs: Ensure that the path pointed to by 'path' is a directory, if possible
  @param path
  @param name
  @return File that is a created directory
  @throws IOException