It appears that directory no longer asserts that it is TRUSTWORTHY as of version 1.2.3.0. This is fine for GHC 7.10 where the module infers that it is Safe. Unfortunately this is not the case on older version of GHC. A TRUSTWORTHY pragma is still necessary for these older version.
Using GHC 7.8.4:
System/Directory.hs:117:1:
Foreign: Can't be safely imported! The module itself isn't safe.
It appears that directory no longer asserts that it is TRUSTWORTHY as of version 1.2.3.0. This is fine for GHC 7.10 where the module infers that it is Safe. Unfortunately this is not the case on older version of GHC. A TRUSTWORTHY pragma is still necessary for these older version.
Using GHC 7.8.4: