Fix filenaming issue when extract ramdisk to a directory