Correctly infer string encoding from empty string

This change handles the case where the first chunk written is an empty
string (`''`) and correctly infers the encoding to be `'string'` instead
of `'buffer'`.
Merge pull request #27 from parshap/infer-string-fix

Correctly infer string encoding from empty string