log-hook on Windows: Write to .bat file and run it
Made log-hook work on Windows and added test for it