Issue #1531 - fix slow running of batch file in Windows
Fix issue with enableddelayedexpansion
Merge pull request #1532 from derekmcloughlin/issue-1531

Issue 1531 - fix issue with slow batch files.