diff --git a/Shellish.hs b/Shellish.hs
--- a/Shellish.hs
+++ b/Shellish.hs
@@ -373,7 +373,8 @@
 withTmpDir :: (FilePath -> ShIO a) -> ShIO a
 withTmpDir act = do
   dir <- liftIO $ getTemporaryDirectory
-  (path, _) <- liftIO $ openTempFile dir "tmp"
+  (path, handle) <- liftIO $ openTempFile dir "tmp"
+  liftIO $ hClose handle -- required on windows
   rm_f path
   mkdir path
   a <- act path `catch_sh` \(e :: SomeException) -> rm_rf path >> throw e
diff --git a/shellish.cabal b/shellish.cabal
--- a/shellish.cabal
+++ b/shellish.cabal
@@ -1,9 +1,9 @@
-Name:                shellish
+Name:       shellish
 
 -- The package version. See the Haskell package versioning policy
 -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
 -- standards guiding when and how versions should be incremented.
-Version:0.1.2
+Version:     0.1.3
 
 Synopsis:    shell-/perl- like (systems) programming in Haskell
 
