Added Windows shell script and updated build to copy and rename template-* files
fixing possible null pointer exceptions