Debug compilation, bugfixes

* Makefile
Added debug compilation.

* include/system.h
Added inclusion of stdio header for debug.

* src/main.c
* src/smime-gate.c
Small bugfixes.