Fix is_command by using which rather than type (we need the output to be only the path).