Fix #1567 (don't write packets_log.txt in cwd).
Bugfix: packet_log file would be overwritten at the end of a run.