Add tests and messages.

The tests are in python because it was quick.
There might be a slight problem if protobuf is not installed system wide (but virtualenv can help).