Wire test/repl into Backend.Python.Selftest

While here, some related cleanups
Merge branch 'master' of github.com:nwf/dyna