test/file: write to tmp file