Organize build.py script a little