Fix for buffer overflow in pfs directory reading code