code: function removeTrailingDirectorySeparator(path) {
          if (path.charAt(path.length - 1) === ts.directorySeparator) {
              return path.substr(0, path.length - 1);
          }
          return path;
      }
docs: Removes a trailing directory separator from a path.
  @param path The path.