Fix for #398 -- dropped sent characters on OSX and Linux.

The changes have **not** been tested on Windows.

On Linux and OS X, multiple megabytes of data has been sent with validation, so it's known to work everywhere else.