fixed bug in dependency validation

error messages should be a lot more helpful now
Merge pull request #186 from erikbern/validate-dep-error

fixed bug in depdency validation