Merge pull request #16 from andrew-aladev/master

Trivial fixes to tests, added cmake tests, gentoo ebuild updated.
changed malloc and memset 0 to calloc, delete unused variable 'token'