Ensure using fallback blob_id method when git fails (#172)
Ensure using fallback blob_id method when git fails (#172)

* Ensure using fallback blob_id method when git fails

We were only using the fallback method if we fail to find HEAD,
but this leads to unexpected behavior. An user can be on a valid
git state and still get an error when getting the blob id if the
file is being .gitignore.

This change will try to get the blob id by reading file if getting
it from git fails for any reason.

* Minor cleanup

Move assignment out of if clause

semaphoresuccess/test-reporter,codeclimate/test-reporter,codeclimate/test-reporter,codeclimate/test-reporter,codeclimate/test-reporter,semaphoresuccess/test-reporter