Fix git initialization with GD

This fixes git repo initialization from GD.
It also is a minor GD fix to not crash on no-existent plugins.
Merge pull request #37 from jaymzh/fix_git_gd

Fix git initialization with GD