Fix readdir_r invocation

Insome cases our buffers are waaaay to small, in a few others they are slightly too small.