Fixes incorrect resolution of Lib directory when packages directory is a symlink.