Improved read/write performance

- treat binary-data directly
- read from fd up to 64kB at a time
Merge pull request #156 from ichizok/improve-readwrite

Improve read/write performance