Fix buffer size extension in TBasket::LoadBasketBuffers

We need to not only resize in write mode but also
check the size in write mode (as the extra space is
counted or not in BufferSize depending on the
read/write mode).