Fix basic typechecking errors

Note to self: need to actually check the scripts compile before
releasing!

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #18 from djs55/experimental-exceptions

Fix basic typechecking errors