test.py: Fix misc bugs when starting up test server

Also, add way of viewing test server output nicely when required.