Use appdirs module to get appropriate cache directory.

This fixes an insecure temporary file creation bug on UNIX-like systems.
Merge pull request #68 from bmerry/master

Use appdirs module to get appropriate cache directory.