Use readlink instead of realpath

realpath doesn't exist on older distros (like rhel6)