maint - adding tests and check target to makefile

Hey Joris,

This is a start for adding tests. I've got some pretty basic tests for all the functions in `buf.c` here and also added travis-ci  [here](https://travis-ci.org/sinemetu1/kore). There are a lot more tests to add for the rest of the framework but I just wanted to get some feedback before I get too far. Please let me know if there's anything particularly glaring here.

Thanks.