Rewrote install batch file in Lua.

This is mostly a direct translation, so there are lots of things to
improve, but it is a working install script written in Lua.