core: default a value to avoid potential exception in SShRun
core: copy STDIN for SSHRun with Subprocess on Windows

The comments explain
core: forgot to gate one change from last commit to Windows
core: Seperate out IO util helper
core: cleaner method of mirroring stdin for Windows