[flang] Fix test script portability problems.
Allow for bash anywhere on path.
Allow for utilites to be in /bin as well as /usr/bin.
Don't count on sed understanding '\t'.
The options to mktemp aren't portable. Instead just create a per-test
temp directory in the working directory (i.e. <build-dir>/test/semantics).
Setting the KEEP environment variable causes them all to be kept to help
in investigating failures.
Fixes flang-compiler/f18#128.
Original-commit: flang-compiler/f18@
3736ceeca83965e3c9e282e92ddb6323523b9e5b
Reviewed-on: https://github.com/flang-compiler/f18/pull/129