Parse log with options

Fix git-log when using options, such as -g. Examine token rather than assuming a set ordering of output.

Fixed test failures and rebased from original pull request.

Original pull request https://github.com/mojombo/grit/pull/106.