Make pathcmd and hascmd conform to our calling conventions