Updated to use tmpdir to store intermediate i/o files.