from `git` module. Actually, the function is a little bit of
over-engineering and it's currently only being used for checking the
result of `git rev-parse --is-inside-work-tree`, even in the `git`
module code.
Checking for the return code of `git rev-parse --is-inside-work-tree` is
enough. Also refactored other portions of the code where return codes
are being checked.
Fixes#161