FIX #1652: openTempFile should accept an empty string for the directory