Work around missing realpath in OSX