Fix FREEPBX-7997

Systems with /var and /tmp on different partitions cause problems. Use Asterisk's temporary directory instead.
as with andrews other comment should this be. 
$tmp = $amp_conf[ASTSPOOLDIR] .'/tmp';