which.c works, but needs getopt and error checking