Fixes issue when git/index does not exist

  * This happens with submodules

The .git file exists but it points to a different location this was causing errors on the timer