Build fix for NetBSD and other systems where /bin/sh isn't bash

This fixes a build failure on NetBSD. test/run_tests.sh runs under /bin/sh but contains some bash-isms, particularly the way arithmetic is done. It fails on systems where /bin/sh isn't bash or a similar-enough shell.

I changed the #! line to /bin/bash. I could have converted the bash-isms instead, but I figured that it would be more likely to keep working in the future if users run the script under the same shell that's used to develop it.