Replacing readlink with cd and pwd

davidbenton reported that `readlink -f` is not available under OSX.
Merge pull request #106 from mkllnk/patch-2

Replacing readlink with cd and pwd