[linux] Make checks whether command exists consistent and POSIX compatible