Combined windows and non-windows handling of redirecting log to file (no
idea why there was ever made a distinction).