Use template haskell to fix the call to withTempDirectory in Setup.hs so that it works with Cabal 1.17
Merge pull request #3 from hamishmack/master

Here is TH fix for Setup.hs and Cabal 1.17