py.test 2.6 recently came out which included new stdio capture which unfortunately cases distutils' logging to break.  I feel like this is more distutils' fault than py.test, but I need to avoid this until a workaround is found.  See https://bitbucket.org/hpk42/pytest/issue/412/crash-on-bad-stdout#comment-11617176
Refactor most of ah_bootstrap.py into a workhorse class.  I think this will make it easier to update it in the future and to understand what's going on.