Trivial improvement for getDirectoryContentsRecursive.