move the tempdir into a lib dir so we can reuse it elsewhere.