Add a simple test file exercising encoding and decoding strings.
Fix segfault when decoding a zero-length buffer.