Ensure 'BufSize' >= 1.

Also fix typo which treats the log message length as buffer size,
thereby causing memory corruption if the latter is less than the former.
Merge pull request #37 from twittner/buffer-fix

Ensure 'BufSize' >= 1.