00-rootdev.sh: use realpath instead of readlink to resolve symlinks

This may fix Gentoo bug #501226