private static void prependPathToVariable(String pathVarName, Map<String, String> env, String paths) {
    if(!TempletonUtils.isset(pathVarName) || !TempletonUtils.isset(paths) || env == null) {
      return;
    }
    if(TempletonUtils.isset(env.get(pathVarName))) {
      env.put(pathVarName, paths + File.pathSeparator + env.get(pathVarName));
    }
    else if(TempletonUtils.isset(System.getenv(pathVarName))) {
      env.put(pathVarName, paths + File.pathSeparator + System.getenv(pathVarName));
    }
    else {
      env.put(pathVarName, paths);
    }
  }
Ensures that {@code paths} are prepended to {@code pathVarName} and made available to forked child
process.
@param paths properly separated list of paths
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java