Fixed read-only .git folder preventing deletion.

Fixes #186.