Added some more tests, travis runs with -Werror and tests run with valgrind

Also fixed a memory leak..

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>