Ported to Windows

* Forcibly removes \r from input source code
* Ported build and test scripts to lua