Fix dataWithContentsOfStream.

It was appending garbage to the result if it read fewer than bufsize bytes.