[CB-6437] Changes from fix paths for OS X

Changes incorporated from the latest fix from git.
Added relative path at --link-to, it only works with local paths.