`catfile` provides a nice wrapper around `git cat-file`, and it was
using the 'wrong' way of doing Git commands. This change uses the Git
DSL for catfile, and slightly refactors the package to use the
repository.GitRepo interface.
Closes: #1934, #1933