use 'dirs' consistently in os.walk() iterations
Merge pull request #4823 from hulu/os-walk-dirs

use 'dirs' consistently in os.walk() iterations