Misc minor improvements:

* Make twod work as standalone script and as module
* Improve error handling on config loading
* Add html reporting to test target