Fixed readAllBuffer() to avoid adding garbage bytes at end.

The function readAllBuffer() always returned a string that was a
multiple of the BufSize in length, regardless of how many bytes were
actually read, padding the result with garbage bytes on the last chunk.
This fix properly trims the last chunk to its actual size.
Merge pull request #1221 from rbehrends/readallbuf-fix

Fixed readAllBuffer() to avoid adding garbage bytes at end.