code: function checkForUnlistedFiles(filenamesFromToc, shouldRemove) {
    return fs.readdir(docPath).then(files => {
      const htmlFiles = files
        .filter(filename => filename.slice(-4) === 'html')
        .map(filename => filename.slice(0, -5));
      const removePromises = [];
      htmlFiles.forEach(filename => {
        if (
          !filenamesFromToc.includes(filename) &&
          filename !== 'index' &&
          filename !== 'globals'
        ) {
          if (shouldRemove) {
            console.log(
              `REMOVING ${docPath}/${filename}.html - not listed in toc.yaml.`
            );
            removePromises.push(fs.unlink(`${docPath}/${filename}.html`));
          } else {
            // This is just a warning, it doesn't need to finish before
            // the process continues.
            console.warn(
              `Unlisted file: ${filename} generated ` +
                `but not listed in toc.yaml.`
            );
          }
        }
      });
      if (shouldRemove) {
        return Promise.all(removePromises).then(() =>
          htmlFiles.filter(filename => filenamesFromToc.includes(filename))
        );
      } else {
        return htmlFiles;
      }
    });
  }
docs: Gets a list of html files in generated dir and checks if any are not
  found in toc.yaml.
  Option to remove the file if not found (used for node docs).
  
  @param {Array} filenamesFromToc Filenames pulled from toc.yaml
  @param {boolean} shouldRemove Should just remove the file