function calculatePath(parentFileName, referencePath) {
  if (path.isAbsolute(referencePath)) {
    return referencePath;
  }
  if (referencePath[0] === localPointer) {
    return `${parentFileName}${referencePath}`;
  }
  let currentDirName = path.dirname(parentFileName),
    refDirName = path.join(currentDirName, referencePath);
  return refDirName;
}
Calculates the path relative to parent
@param {string} parentFileName - parent file name of the current node
@param {string} referencePath - value of the $ref property
@returns {object} - Detect root files result object