Unwinds all symlinks along the directory trail path, returning
a path with no symlink components or 0, in case path does not
exist, for instance because one of its links pointed to a
nonexistent file or if there was a symlink loop. The returned path
is also canonicized/simplified, removing "//", "/./" and the like.