Dependency check

See https://bugs.launchpad.net/oq-engine/+bug/1370312. The tests are green: https://ci.openquake.org/job/zdevel_oq-commonlib/97
Please add an example to make it more readable