There is no need to clear buffers here because we copy all data in a moment
Changing the API a bit
Added tests for getting dirty pages of a binary buffer