qemu-img: check file existence to avoid loops

Still don't know exactly how this happens.