static validatePath(path) {
    if (path === undefined) {
      return undefined;
    } else if (typeof path !== 'string') {
      this.throwInvalidPathError(path, `Path should be a string.`);
      return;
    } else if (!path.startsWith('/')) {
      this.throwInvalidPathError(path, `Path should start with '/'.`);
    } else if ((path.match(/\*/g) || []).length > 1) {
      this.throwInvalidPathError(path, `Path should only contain one '*'.`);
    } else if ((path.match(/\$/g) || []).length > 1) {
      this.throwInvalidPathError(path, `Path should only contain one '$' character.`);
    } else if (path.includes('$') && !path.endsWith('$')) {
      this.throwInvalidPathError(path, `'$' character should only occur at end of path.`);
    }
    return path;
  }
Validates that path is either: a) undefined or ) properly formed.
Verifies the quantity and location of the two robot.txt regex characters: $, *
@param {unknown} path
@return {undefined|string}