That is not the problem with the previous implementation.  See the documentation here:
http://docs.python.org/2/library/os.html
Setting topdown=True in os.walk allows you to modify the dirnames to determine which to traverse.  But it seems to have a bug causing to to traverse build_system even though it is in the ignored list.

Let's discuss tomorrow.  I want to make sure you can reproduce the problem and maybe you will understand what is going on better.