code: function ensureTrailingDirectorySeparator(path) {
          if (path.charAt(path.length - 1) !== ts.directorySeparator) {
              return path + ts.directorySeparator;
          }
          return path;
      }
docs: Adds a trailing directory separator to a path, if it does not already have one.
  @param path The path.