ENH Cleaned up the way that dirs is being called, now it always uses the recursive function