added exec(cmd,output,input,avpenv) function for exec module