refactor out generation of Unix, Cygwin, Windows friendly search paths for general use