Fixed the simple.c example so as to cope with small buffers.  Fixes #58.