Fix the handling of pipes on Windows platforms.