Fix the filesystem implementation in order to get blargSnes to run

Using more explicit variable names and a while looks much more readable to me.
It’d be something like that:
```c++
u32 entries_read = 0;
while (entries_read < count && next_entry_in_directory < total_entries_in_directory) {
```