Avoid polluting $error on module load

I made some small tweaks so I don't see errors from loading posh-git in $error.

These changes are only tested against PowerShell V4, but I think they should work fine in V3 and V2.