WIP: Reworked build_deps script a bit and fixed more bit rot.  Much testing left to do.