diff --git a/System/Plugin.hs b/System/Plugin.hs
--- a/System/Plugin.hs
+++ b/System/Plugin.hs
@@ -10,6 +10,7 @@
 import GHC.Paths (libdir, ghc)
 import MonadUtils (liftIO)
 import System.Directory
+import System.FilePath
 import System.Exit
 import System.IO
 import System.Process
@@ -163,10 +164,10 @@
   uniqueId <- getPicoseconds 
 
   -- Initialise.
-  let tempDir           = "/tmp/" 
-      tempModule        = "TypeCheck" ++ show uniqueId
-      tempFile          = tempDir ++ tempModule ++ ".hs"
-      errFile           = tempDir ++ tempModule ++ ".log"
+  tempDir <- getTemporaryDirectory
+  let tempModule        = "TypeCheck" ++ show uniqueId
+      tempFile          = tempDir </> tempModule ++ ".hs"
+      errFile           = tempDir </> tempModule ++ ".log"
       checkExpression   = "typecheck"
 
   -- Try compile temp module.
diff --git a/pdynload.cabal b/pdynload.cabal
--- a/pdynload.cabal
+++ b/pdynload.cabal
@@ -1,5 +1,5 @@
 name:			pdynload
-version:		0.0.1
+version:		0.0.2
 Cabal-Version:	>= 1.6
 license:		GPL-3
 license-file:	LICENSE
@@ -24,6 +24,7 @@
      build-depends: base >= 4 && < 5, 
                     ghc-paths >= 0.1.0.6,
                     directory >= 1.0.1.1,					
+                    filepath >= 1.1.0.4,
                     process >= 1.0.1.3, 
                     old-time >= 1.0.0.5,
                     ghc >= 6.12
