Note that `realpath` can raise under certain circumstances, for example if the symlink target no longer exists.