fix recursive directory iterator