This function is better hosted in util.cc since readlink is identical on Linux and OS X.