Move git_init check into it's own block under have_git

This allows gitignore to be generated even if we don't wish to initialize the cookbook as it's own git repo
This is a quick fix for Issue #145 

I'm not 100% sure but this likely falls under Obvious Fix policy.