use temp dir, fixes #24