replace `readlink -f` w/ perl so it works on osx