public String validateProgram(String path)
    throws NotAuthorizedException, IOException {
    File f = new File(path);
    if (f.canExecute()) {
      return f.getCanonicalPath();
    } else {
      throw new NotAuthorizedException("Unable to access program: " + path);
    }
  }
Given a program name, lookup the fully qualified path.  Throws
an exception if the program is missing or not authorized.

@param path      The path of the program.
@return The path of the validated program.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java