Functional tests

This is a derivative of https://github.com/zerovm/zerovm-cli/pull/45, with the errors fixed and tests passing. Most of the issues were with python3 compatibility.