canonicalizePath tries to remove as many symlink components as possible,
but this is not what we want for a lot of operations like copying
files. So instead we preserve the last path component if it's a symlink
and canonicalize it's parent filepath.
we now have:
* AnchoredFile -- for representing a file with context
* File -- for representing a file only
Both representations mean "file" in the broader sense, including
directories.