This makes the script usable on windows and speeds it up by an order of magnitude, since no new process needs to be forked for each layout file. It also does not conevrt .old files again.