Buffer data and split on delimiter for received data

Fixes #4, as far as my tests have shown.

The tests aren't working at all for me on a clean pull, but if I get those working I'll write some tests, too.