Fix pg_upgrade log file cleanup code

Recent pg_upgrade parallel improvements introduced a bug that prevented
cleanup of per-database log files.