Removed some buffer overflows from sprintf.c

sprintf.c contained some buffer overflows of buffers on the stack.
These were written to, checked if they overflowed and fatal() was
called if there was an overflow...
Mostly by use of snprintf() these overflows can't happen anymore
and the fatal() is an ordinary runtime error.
(fixes #825)