Changed cache_dir to temp_dir, using the tempfile-module. Closes #5