Perl: test for dependencies in stage1, for clearer error messages.