More filesystem iterator cleanup

Renamed the callback functions and made some minor rearrangements
to clean up the flow of some code.
More filesystem iterator tests

Refactors the helper function that builds a directory hierarchy
and then made use of it to try more variations on filesystem
iterator tests.