mkrootfs/mkupdate: fix issues caused by the 'realpath' command