Newline in `which` output

Which command sometimes appends a newline ('\n') at the end of it's output. Trim output to get rid of newline if present.