Adds karma & travis tests.
Merged security patch.