Improve detection performance (#67)
Refactor VCS detection
Merge pull request 68 from bling/performance

Closes #68.