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

Fixed by explicitly using /bin/bash. Removing bash-isms would also
work. But /bin/sh is bash on most developers' systems, so using that
shell explicitly seems like it's less likely to break in the future.
Removed bash dependency in test/run_tests.sh and updated for NetBSD.
Merge NetBSD build fix (no BASHisms) closes #90