fix(scripts): make lint-style.* work on macos and windows (#6047)
Make lint-style.sh use a POSIX-portable way of checking for executable bits, and make it always open files as UTF-8.
Also makes CI run the sanity checks across all 3 OSes to ensure this stays working.