code: function _getRoot(obj) {
    return (getCallingDir(((obj && obj.basedir) ? obj.basedir : undefined)) || (obj?obj.basedir:undefined));
  }
docs: Get the root directory to use from the supplied object or calculate it.
  
  @private
  @param {Object} obj    The options object containing a 'dir' property.
  @returns {string}      The directory path.