If we use a file which exists but is not executable as an argument to
run.sh, run.sh will silently ignore it. This is wrong.
Instead, just check for existence of the file (or directory), and error
out with a "Permission denied" message later, when we try to run it.
export LD_LIBRARY_PATH=.
[ $# -gt 0 ] && [ "$1" = "gdb" ] && PREFIX=gdb && shift
-[ $# -gt 0 ] && [ -x "$1" ] && [ -f "$1" ] && BIN="$1" && shift
+[ $# -gt 0 ] && [ -e "$1" ] && BIN="$1" && shift
-set -x
+set -xe
$PREFIX $BIN $@