fix problem of running command line under cygwin 

cygwin is complaining about paths and it requires . as current path
additionally I fixed problem when JAVA_HOME has some spaces.

there is still small fix to be done as tput is not available on cygwin - now it complains about missing command.