Translated most of the engine work from shell to awk.
Tested that the output is the same (except the order of created files).
Time comparison
---------------
Windows:
* Little gnomes - 99s -> 0.3s
* Creating - 68s -> 1s
* Total - 205s -> 35s
Linux:
* Little gnomes - 3s -> 0.03s
* Creating - 2s -> 0.11s
* Total - 8s -> 3.8s