Check common failure cases and pass options to cabal.

This closes #5.