Use os.walk properly.

os.walk descends into subdirectories, so iterating over them is redundant.