A quick refactor of parse_git_dirty

Fixes #27