Thanks rma (a year later), that solved my issue too! For anyone else running FOG headless, this single command fixes it:
sed ‘s:&$tmp:$tmp:’ -i /var/www/fog/management/includes/tasks.confirm.include.php
For those unfamiliar with sed, the command simply replaces “&$tmp” with “$tmp” in the file.