(Compatibility) replaced realpath with readlink -f.