Properly restore $std{out,err} to original value
Remove duplicate cygwin in RUBY_PLATFORM check