use prefix instead of dir in call to mkdtemp