Use readlink -f instead of realpath

realpath is not available on all distributions. readlink, however, is
part of the GNU-coreutils