Fix `cabal install --enable-tests` in a sandbox environment

When `cabal install --enable-tests` is done in a sandbox environment, the build directory is `dist/dist-sandbox-HASH/build`.