gen_initramfs.sh: use realpath to ensure that udevdir files are grepped correctly

See Gentoo bug #495194