readlink -f doesn't work on Mac OS; don't use -f

I don't know any good cross-platform way to do this simply, so I inlined
the first solution from
http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac.
(I added quotes in appropriate places to make the script still work with
spaces or backslashes.)

This closes #243.

Reported By: Peter LeFanu Lumsdaine
Merge pull request #245 from JasonGross/fix-readlink-f

readlink -f doesn't work on Mac OS; don't use -f

Better to merge this than to have a fatal compilation falure on OSX.