Port to Windows

The Windows console does not grok ANSI escape sequences, instead
we need to use the console API.