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

Nor does this.