fixing null pointer bug on IterateDirectoriesImpl constructor