Add basic IO to the library

In particular the library can now execute commands. We will use this
to execute the 'thin_*' programs directly.

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