fixed for cygwin
fixed duplicate entries in path