fix bug in tests

The body from ./git/refs is an array.
Hypothetically travis runs a stricter version of npm/node which throws
an error on their system, but not on mine.
This might make the problem go away.
use Makefile for test (slightly less noise)
fix issue preventing previous fix
fail earlier then