preserve former git environment variables

This ensures that the git environment variables are restored to their original values after every git command. 

In the event that this gem is included in an application that interacts with the git CLI, after calling into this gem, those command line calls may fail with mysterious errors complaining about a working tree that already exists.

I was seeing this in a chef cookbook repository where this gem is used to create versions based on number of commits and a subsequent Berksfile sync attempting to pull a git based cookbook was failing.