Make bats tests shellcheck compatible and run shellcheck on them
Since we want everything to be linted with shellcheck, that should include the bats tests too.
Per https://bats-core.readthedocs.io/en/stable/faq.html#how-can-i-lint-shell-format-my-bats-tests, bats has an alternative syntax that makes it look like a bash script.
Looking at https://github.com/koalaman/shellcheck/pull/1469, it also appears that shellcheck should support bats as is too.