Make sure cask is installed before installing any package it provides.

It closes #7 also includes same changes in #14.