delete tempfiles, and remember how python indexes