Use 'tempdir rather than 'inplace for temp files (fixes #8)