Split out Windows versions of some rts files

This allows the introduction of Posix functionality, parallel Windows
implementations can then be put in the windows/ directory.