code: async function determineRefPathName(dir, refPathName) {
    const branches = await git.listBranches({ dir });
    const tags = await git.listTags({ dir });
    const refs = branches.concat(tags);
    // find matching refs
    const matchingRefs = refs.filter(ref => refPathName.startsWith(`${ref}/`));
    if (!matchingRefs.length) {
      return undefined;
    }
    // find longest matching ref
    const matchingRef = matchingRefs.reduce((a, b) => ((b.length > a.length) ? b : a));
    return { ref: matchingRef, pathName: refPathName.substr(matchingRef.length) };
  }
docs: Parses Github url path subsegment `<ref>/<filePath>` (e.g. `master/some/file.txt`
  or `some/branch/some/file.txt`) and returns an `{ ref, fpath }` object.
  
  Issue #53: Handle branch names containing '/' (e.g. 'foo/bar')
  
  @param {string} dir git repo path
  @param {string} refPathName path including reference (branch or tag) and file path
  (e.g. `master/some/file.txt` or `some/branch/some/file.txt`)
  @returns {Promise<object>} an `{ ref, pathName }` object or `undefined` if the ref cannot
  be resolved to an existing branch or tag.