Small changes toward better testing

Various small changes toward an easier-to-use test harness, the biggest of which is moving the meat of dxr-build into a module so we can call it without going through a shell.