Add logging & word counter, fix kana statistics output

Output for kana statistics will now retry if > max msg length.
Loggin in data directory, uses public messages only. To be
used for word counter command :wordstats.
Fix previous version

There were some syntax errors and such.
Fix security fault

Now it's surely more secure.
Read /proc/meminfo directly in Memory