test: write to the underlying file before creating the loop device

The loop device is a coherence disaster, it isn't enough to write to
it before creating the device mapper device on top. We create the file,
write to it, and then create both the loop and the device mapper device.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>