Git bug and test refactor

Fixes a long-standing bug, expressed here: https://github.com/rafecolton/docker-builder/issues/142

Closes https://github.com/rafecolton/docker-builder/pull/143
Resolves https://github.com/rafecolton/docker-builder/issues/142

/cc @jszwedko @baileyb @wjzijderveld @colegleason @josephschorr