Fix up programmatic interface to rebar3

Now supports arbitrary commands
Tests and fixes for namespaces