using function to detect path to binary

this ensures that if wpa_cli and/or ip
are installed in /sbin or /usr/sbin they
will be invoked, no matter that PATH env.
variable.