make rmdups work on cygwin, add ~/bin to front of path
fix for case where $ENV{SHELL} is undefined
fix bug in last commit