minor code cleanup
fix build_dir copying in Py2.[45]
more code cleanups