diff --git a/DocTest.cabal b/DocTest.cabal
--- a/DocTest.cabal
+++ b/DocTest.cabal
@@ -1,5 +1,5 @@
 name:                DocTest
-version:             0.0.2
+version:             0.0.3
 stability:           experimental
 synopsis:            Test interactive Haskell examples
 description:         DocTest checks examples in source code comments.
@@ -18,7 +18,7 @@
                      , haskell-src
                      , directory
                      , filepath
-					 , process
+                     , process
 build-type:          Simple
 
 extra-source-files:
diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -1,28 +1,12 @@
 module Main where
 
-import System.Directory
 import System.Environment
-import System.FilePath
-import Control.Exception(finally)
 import Test.DocTest
 import Test.DocTest.Parser
 import Test.HUnit
 
-
 main = do
-	withTempDir "DocTestSandbox" run
-
-run tmpdir = do
 	args <- getArgs
 	docTests <- mapM parseModule args
-	tests <- mapM (doTest tmpdir) (concat docTests)
+	tests <- mapM docTestToTestCase (concat docTests)
 	runTestTT (TestList tests)
-
-withTempDir :: FilePath -> (FilePath -> IO a) -> IO a
-withTempDir name action = do
-	tmpdir <- catch getTemporaryDirectory (\_ -> return ".")
-	let path = combine tmpdir name
-	--createDirectory path
-	--finally (action path) (removeDirectoryRecursive path)
-	createDirectoryIfMissing False path
-	action path
diff --git a/Test/DocTest.hs b/Test/DocTest.hs
--- a/Test/DocTest.hs
+++ b/Test/DocTest.hs
@@ -23,16 +23,15 @@
 	"main = do\n" ++
 	"    putStr (show (" ++ expression ++ "))\n"
 
-runDocTest test baseDir = do
+docTestToTestCase :: DocTest -> IO Test
+docTestToTestCase test = do
+	canonicalModulePath <- canonicalizePath $ source test
+	let baseDir = packageBaseDir canonicalModulePath (_module test)
+
 	ret <- readProcess "runhaskell" ["-i" ++ baseDir] (_testModule test)
 	return (TestCase (assertEqual (source test) (result test) ret))
 
 
-doTest :: FilePath -> DocTest -> IO Test
-doTest directory test = do
-	canonicalModulePath <- canonicalizePath $ source test
-	let baseDir = packageBaseDir canonicalModulePath (_module test)
-	runDocTest test baseDir
 
 -- Maps a given source file and a corresponding module name to the base
 -- directory of the package.
