A partial fix to quicksurf/quicksurf-bash-utilities#6

This changes the ib script to silently check if in a work tree and return with the appropriate exit code.