modified gradle to deploy on windows
Made it workable on Unix
1. graceful termination on xnix. 2. cleaned up the code a bit
Merge branch 'winDeploy'