fixing readlink not working on OSX