work tree check bug fix

the error code was being checked for the rev-parse command.  a clean exit with an stdout of "false" was considered being inside the work tree, which causes problems when inside a .git folder