Fixed lots of compiler warnings

Mostly signed/unsigned mismatches.
Switched 'sprintf' for 'snprintf'

Hopefully this eliminates the potential buffer overflow on
filenames.
Fix more compiler warnings in ytnef (binary)
BugFix - segfault in compressed RTF handling.
Added a basic set of unit tests
Add /usr/local/lib to library path for travis.
Merge pull request #6 from Yeraze/bugfix/CVE-2009-3721

Bugfix/cve 2009 3721