better way of detecting temp folder
Merge pull request #21 from pirj/fix-tmpdir-detection

Ruby has a method for detecting temp directory.