Fix previous commit on path canonicalization

realpath might not exist on SLE11, so use readlink -m instead.