Use Sys.which() to avoid test error on Solaris

* solaris "which" does not return an error code when the executable cannot 
  be found
* Sys.which() looks after this difference in behaviour
* problem and solution brought to my attention by the inimitable Brian Ripley