Rationalize `build` and `hack` directories

This also enables incremental builds for dockerized builds.

Fixes #1729
Ah -- right -- can I get away with quoting the entire thing?

```bash
set -- "${testcases[@]+${testcases[@]}}"
```