Make ghc-cabal's `System.Directory` import more robust