Refactored code a bit, changed to a Unix script.
Batch files are too annoying.