scripts/detect.sh: clean up
scripts/detect.sh: clean up

Remove the need to use a temporary file, fix all the shellcheck
warnings, and add 'set -eu'.

ebiggers/libdeflate,ebiggers/libdeflate,ebiggers/libdeflate