Revised tests to use tmp_path for file paths.