Use unique tmpfile for dumping macros, if several iurt create/remove /tmp/rpmmacros things will fail sometimes