Fix skipping dependencies with default values

There are no tests for `_validate_dependencies` so a bug slipped in with the fix for #353 where dependencies with default values were not being skipped properly. This pull request fixes that and adds the missing test coverage.
excellent, this is better, but it doesn't take into consideration that `dependencies` can also be a string (just one dependency case). Would you update the PR do handle that case please.