Add ability to run build on test

I've added the ability to run the build on test as well as deploy and tidied a few bits up that I came across.

Open for discussion.
My pleasure, looking into a bug in `docker-runner` now. If you're on IRC I'd really appreciate if you know anything about it