Properly handle duplicate commits when pushes are in the equation.

Also, use a temporary directory rather than one based on the commit sha
to allow for overlap if it occurs.
Merge pull request #15 from nevir/handle-duplicate-commits

Properly handle duplicate commits when pushes are in the equation.