Buffer OS X read_raw() for faster loading

Also add attach() and detach() to read_raw() and write_raw() and remove
trailing whitespace on a function.
Merge pull request #8 from tareqak/buffer_osx_reads

Buffer OS X read_raw() for faster loading