code: function (dir, appname, version) {
    if (appname) {
      dir = path.join(dir, appname);
      if (version) {
        dir = path.join(dir, version);
      }
    }
    return dir;
  }
docs: Append the name and and version to a path.
  
  Both the appname and version are optional. The version is only appended if
  the appname.
  
  @param {string} dir Base directory.
  @param {string} [appname] Optional name to append.
  @param {string} [version] Optional version to append.
  @returns {string} Resulting path
  @private