guestfish_block_dev: Split image preparation from individual test case

Make create image and create filesystem as public function