Use temporary file for test input file in doctest.