Fixed a bug in Router.onBeforeAction()
Bugfix for repo scanning

Not sure why, but when the gitIsEnabled check was before the path
processor loop and gitIsEnabled returned true, the path processor loop
was skipped.
Enable git automatically if it's in $PATH.