mklldeps.py: Write to file instead of print

It seems that msys automatically converts `\n` to `\r\n` on pipe
redirection, which causes `make tidy` failure.