More reliable first file line reading in grainw.bat and better support of Cygwin in grainw