Add windows support and work around issue with SCP_TO on windows systems

This appears to be an extra end.