Pep8 fixes for build.py

I started this as the first part of some other changes, but I guess it's easiest to merge it first.