thin_restore: ensure we've flushed the XML before invoking the command

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