Add gmock.
Fix reporting of partial shippment.

Previously when barn-agent shipped a few files but then failed it
didn't report the number of shipped files before failure.