Run shell scripts through shellcheck

I think we do want the options to be seen as multiple arguments. I suspect this is what's making the mingw build fail.