Fix test

I also made it check the default buffer size from the OS, as the value
used wasn't enough to fill the buffer on my computer, so the test would
pass with or without the fix.