Filter out newlines from error messages on Windows