readdirSyncRecursive: add a filter argument

filter is an optional filter function that will be applied on the records of
each sub-directory to keep only the records you need. Avoiding redundencies
is critical for big folders trees