Use process-specific tmp file and clean up on exit

Fixes #279 using the suggestion from @hemanth, with some minor tweaks:

- I kept the leading . because I figured there was a reason it was put there originally.
- Changed the show_cursor method that's called when the process exits (prematurely or naturally) to be show_cursor_and_cleanup, and added a line to it that cleans up the tmp file.
Merge pull request #283 from e28eta/patch-1

Process-specific tmp file and clean up on exit.