Rationalize `build` and `hack` directories

This also enables incremental builds for dockerized builds.

Fixes #1729
The quotes were correct here... If you remove them then in presence of spaces it will break due to word splitting.