diff --git a/Data/Git/Storage/Loose.hs b/Data/Git/Storage/Loose.hs
--- a/Data/Git/Storage/Loose.hs
+++ b/Data/Git/Storage/Loose.hs
@@ -166,7 +166,7 @@
 
 -- | write an object to disk as a loose reference.
 -- use looseWriteBlobFromFile for efficiently writing blobs when being commited from a file.
-looseWrite repoPath obj = createDirectory False (directory path)
+looseWrite repoPath obj = createDirectory True (directory path)
                        >> isFile path
                        >>= \exists -> unless exists (writeFileLazy path $ compress content)
                        >> return ref
diff --git a/hit.cabal b/hit.cabal
--- a/hit.cabal
+++ b/hit.cabal
@@ -1,5 +1,5 @@
 Name:                hit
-Version:             0.4.0
+Version:             0.4.1
 Synopsis:            Git operations in haskell
 Description:
     .
