implement mktemp fallback instead of plain replacement with 7592