Apparently realpath is not portable. Same for which -s.