diff --git a/Language/Haskell/GhcMod/GHCApi.hs b/Language/Haskell/GhcMod/GHCApi.hs
--- a/Language/Haskell/GhcMod/GHCApi.hs
+++ b/Language/Haskell/GhcMod/GHCApi.hs
@@ -116,13 +116,13 @@
 
 -- FIXME removing Options
 modifyFlags :: DynFlags -> [IncludeDir] -> [Package] -> Bool -> Build -> DynFlags
-modifyFlags d0 idirs pepPkgs splice build
+modifyFlags d0 idirs depPkgs splice build
   | splice    = setSplice d4
   | otherwise = d4
   where
     d1 = d0 { importPaths = idirs }
     d2 = setFastOrNot d1 Fast
-    d3 = Gap.addDevPkgs d2 pepPkgs
+    d3 = Gap.addDevPkgs d2 depPkgs
     d4 | build == CabalPkg = Gap.setCabalPkg d3
        | otherwise         = d3
 
diff --git a/ghc-mod.cabal b/ghc-mod.cabal
--- a/ghc-mod.cabal
+++ b/ghc-mod.cabal
@@ -1,5 +1,5 @@
 Name:                   ghc-mod
-Version:                3.1.2
+Version:                3.1.3
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
@@ -131,6 +131,8 @@
                       , time
                       , transformers
                       , hspec >= 1.7.1
+  if impl(ghc < 7.6.0)
+    Build-Depends: executable-path
 
 Source-Repository head
   Type:                 git
diff --git a/test/InfoSpec.hs b/test/InfoSpec.hs
--- a/test/InfoSpec.hs
+++ b/test/InfoSpec.hs
@@ -1,9 +1,17 @@
+{-# LANGUAGE CPP #-}
 module InfoSpec where
 
+import Control.Applicative ((<$>))
 import Data.List (isPrefixOf)
 import Language.Haskell.GhcMod
 import Language.Haskell.GhcMod.Cradle
+#if __GLASGOW_HASKELL__ < 706
+import System.Environment.Executable (getExecutablePath)
+#else
+import System.Environment (getExecutablePath)
+#endif
 import System.Exit
+import System.FilePath
 import System.Process
 import Test.Hspec
 
@@ -50,5 +58,9 @@
                 res `shouldSatisfy` ("bar :: [Char]" `isPrefixOf`)
 
         it "doesn't fail on unicode output" $ do
-            code <- rawSystem "dist/build/ghc-mod/ghc-mod" ["info", "test/data/Unicode.hs", "Unicode", "unicode"]
+            dir <- getDistDir
+            code <- rawSystem (dir </> "build/ghc-mod/ghc-mod") ["info", "test/data/Unicode.hs", "Unicode", "unicode"]
             code `shouldSatisfy` (== ExitSuccess)
+
+getDistDir :: IO FilePath
+getDistDir = takeDirectory . takeDirectory . takeDirectory <$> getExecutablePath
