Fixing deprecated warning on Mac for tmpnam