Resolve a cd command to an absolute path
Write a function that takes the current directory and the argument to cd, and returns the directory pwd would print afterwards. Handle ., .., repeated and trailing slashes, and absolute targets. Later parts add shortcuts such as a home directory and symbolic links that remap one path prefix to another, including links that point at each other.
No answer yet. Write the first one; the best answer gets endorsed.
