TST/BUG/CLN: make stata IO tests use temporary files for writing