Prepare 1.2.1+patch branch
Use System.console() for stdout if available
Add support for Windows cmd files

Same as current support for Windows bat files.