Bugfix: Memory handling related to or exposed by f_directory unit tests.
Replace a double pointer cast with a single pointer cast.
Just in case, if the struct dirent listing is allocated, free it when scandir() returns -1.
The entire struct dirent pointers do not need to be allocated as I thought.
It seems these are copied inside scandir() where the memory deletes inside that function did not affect the mock pointer from the caller.
This resulted in a minor memory leak in the unit test program.
Replace the outermost struct dirent malloc with just a struct dirent array in these cases.