Fix #247: Use absolute path for temporary file