os.path.walk() is gone in Python 3; use os.walk() instead
Fix another None-to-integer comparison for Python 3