Added support for files larger than the buffer size.
Added a test to flush().
Fixed a major bug in flush(), where the user couldn't continue to use it.
One of the loads wasn't passing along flag to keep in buffer.
Avoiding data copying where possible.