gen_cpio: Add support for including whole directory trees

(mostly copied from gen_initramfs_list.sh)