Abstract git logic

Closes https://github.com/gjtorikian/jekyll-last-modified-at/issues/12

@parkr Would something like this work for your use case? In any event it tidies up the Git stuff and makes no assumptions about whether you're using Git at all.