```ts
/**
 * A cleaned form of a slash-separated relative path.
 * @throws {Error} if the input is empty, begins with a slash, or is not a string.
 */
export function normalizeRelPath(path: string): string {
  if (typeof path !== 'string' || path === '' || path.startsWith('/')) {
    throw new Error('Invalid path');
  }

  const out: string[] = [];
  for (const segment of path.split("/")) {
    if (segment === "..") {
      if (out.length > 0) {
        out.pop();
      } else {
        throw new Error('Attempt to climb above starting point');
      }
    } else if (segment !== ".") {
      out.push(segment);
    }
  }

  return out.join("/") || ".";
}
```