diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Revision history for hpath-directory
 
+## 0.13.3 -- 2020-04-14
+
+* Fix tests on mac
+
 ## 0.13.2 -- 2020-02-17
 
 * Fix bug in `createDirRecursive` with trailing path separators
diff --git a/hpath-directory.cabal b/hpath-directory.cabal
--- a/hpath-directory.cabal
+++ b/hpath-directory.cabal
@@ -1,7 +1,7 @@
 cabal-version:       >=1.10
 
 name:                hpath-directory
-version:             0.13.2
+version:             0.13.3
 synopsis:            Alternative to 'directory' package with ByteString based filepaths
 description:         This provides a safer alternative to the 'directory'
                      package. FilePaths are ByteString based, so this
@@ -43,7 +43,7 @@
                        , hpath-posix         >= 0.13
                        , safe-exceptions     >= 0.1
                        , streamly            >= 0.7
-                       , streamly-bytestring >= 0.1.0.1
+                       , streamly-bytestring >= 0.1.2
                        , time                >= 1.8
                        , unix                >= 2.5
                        , unix-bytestring     >= 0.3
diff --git a/src/System/Posix/RawFilePath/Directory.hs b/src/System/Posix/RawFilePath/Directory.hs
--- a/src/System/Posix/RawFilePath/Directory.hs
+++ b/src/System/Posix/RawFilePath/Directory.hs
@@ -564,7 +564,7 @@
 --
 -- Throws:
 --
---    - `InappropriateType` for wrong file type (directory)
+--    - `InappropriateType` or `PermissionDenied` for wrong file type (directory)
 --    - `NoSuchThing` if the file does not exist
 --    - `PermissionDenied` if the directory cannot be read
 --
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -8,6 +8,9 @@
 import qualified Spec
 import Utils
 import System.Posix.Temp.ByteString (mkdtemp)
+import System.Posix.Env.ByteString (getEnvDefault)
+import System.Posix.FilePath ((</>))
+import "hpath-directory" System.Posix.RawFilePath.Directory
 
 
 -- TODO: chardev, blockdev, namedpipe, socket
@@ -15,7 +18,8 @@
 
 main :: IO ()
 main = do
-  tmpBase <- mkdtemp "/tmp/"
+  tmpdir <- getEnvDefault "TMPDIR" "/tmp" >>= canonicalizePath
+  tmpBase <- mkdtemp (tmpdir </> "hpath-directory")
   writeIORef baseTmpDir (Just (tmpBase `BS.append` "/"))
   putStrLn $ ("Temporary test directory at: " ++ show tmpBase)
   hspecWith
diff --git a/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveCollectFailuresSpec.hs b/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveCollectFailuresSpec.hs
--- a/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveCollectFailuresSpec.hs
+++ b/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveCollectFailuresSpec.hs
@@ -125,7 +125,7 @@
                         "outputDir"
                         Strict
                         CollectFailures
-      (system $ "diff -r --no-dereference "
+      (system $ "diff -r "
                           ++ toString tmpDir' ++ "inputDir" ++ " "
                           ++ toString tmpDir' ++ "outputDir"
                           ++ " >/dev/null")
diff --git a/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveOverwriteSpec.hs b/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveOverwriteSpec.hs
--- a/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveOverwriteSpec.hs
+++ b/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveOverwriteSpec.hs
@@ -104,7 +104,7 @@
                         "outputDir"
                         Overwrite
                         FailEarly
-      (system $ "diff -r --no-dereference "
+      (system $ "diff -r "
                           ++ toString tmpDir' ++ "inputDir" ++ " "
                           ++ toString tmpDir' ++ "outputDir"
                           ++ " >/dev/null")
@@ -113,7 +113,7 @@
 
     it "copyDirRecursive (Overwrite, FailEarly), destination dir already exists" $ do
       tmpDir' <- getRawTmpDir
-      (system $ "diff -r --no-dereference "
+      (system $ "diff -r "
                           ++ toString tmpDir' ++ "inputDir" ++ " "
                           ++ toString tmpDir' ++ "alreadyExistsD"
                           ++ " >/dev/null")
@@ -122,7 +122,7 @@
                         "alreadyExistsD"
                         Overwrite
                         FailEarly
-      (system $ "diff -r --no-dereference "
+      (system $ "diff -r "
                           ++ toString tmpDir' ++ "inputDir" ++ " "
                           ++ toString tmpDir' ++ "alreadyExistsD"
                           ++ " >/dev/null")
diff --git a/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveSpec.hs b/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveSpec.hs
--- a/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveSpec.hs
+++ b/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveSpec.hs
@@ -89,7 +89,7 @@
                         "outputDir"
                         Strict
                         FailEarly
-      (system $ "diff -r --no-dereference "
+      (system $ "diff -r "
                           ++ toString tmpDir' ++ "inputDir" ++ " "
                           ++ toString tmpDir' ++ "outputDir"
                           ++ " >/dev/null")
diff --git a/test/System/Posix/RawFilePath/Directory/DeleteFileSpec.hs b/test/System/Posix/RawFilePath/Directory/DeleteFileSpec.hs
--- a/test/System/Posix/RawFilePath/Directory/DeleteFileSpec.hs
+++ b/test/System/Posix/RawFilePath/Directory/DeleteFileSpec.hs
@@ -70,7 +70,7 @@
     it "deleteFile, wrong file type (directory)" $
       deleteFile' "dir"
         `shouldThrow`
-        (\e -> ioeGetErrorType e == InappropriateType)
+        (\e -> ioeGetErrorType e == InappropriateType || ioeGetErrorType e == PermissionDenied)
 
     it "deleteFile, file does not exist" $
       deleteFile' "doesNotExist"
