Move the post-test verification logic to a library

This should allow us to interpret an I/O 'program' and then
verify the results on disk look like how we expect.

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