Implement fs::realpath

This can be used to strip all symlinks from a pathname.