Fix check scripts for Windows
# What does this PR do?

The current check-X scripts are reading/writing with `os.linesep` as the newline separator. On Windows it makes the overwritten files in CRLF instead of LF. Same logic is applied on Mac with CR. Now, Python will always use LF to read and write in the files.
It doesn't make any change on Linux, and you've tested it on Windows. Could we get someone using MacOS to double-check it doesn't break anything for them before merging?<|||||>I think @LysandreJik is on MacOS?<|||||>I'm actually between Manjaro and EndeavourOS, but I'll check on a Mac.