Add some unit tests and coveralls config.

Updated Travis config.