Switched code over from absolute paths to canonical paths for caching
on, since this also works with symbolic links.