FIX #1689 (openTempFile returns wrong filename)