Serialise conversion (avoiding running out of fds etc)

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