virt-libguestfs: Fix bugs in virt_sysprep test

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>