Replace readlink_R with realpath(1).

No problems are new and most solutions are old.