Non-zero exit on failure in detect

Previously, if a failure occurred in detect, the exit code was
undefined. To meet the buildpack contract, a non-zero exit code is not
returned in the case of a failure in the detect method.

[#49421471]
Merge 49421471-detect-non-zero to master

[Completes #49421471]