Make sure repo creation failures get logged
Ignore .hg/.git folders, but not root files that start with .hg/.git

Fixes #388 and #390