Add travis badge and fix test.