replace deprecated tmpnam() with TSystem::TempFileName().