Fix bug #DPP-80 + Makefile improvement

Hello,

This commit contains a simple fix for DPP-80 and also improvements on the Makefile to support cabal sandbox. Read commit message for more info about what you can do with the Makefile.