Use posixpath module when testing if a command exists