switched tempdir to /tmp, to work cross-platform