Check requirements for the build

Merged
AL
5y ago
+16-7

(variables rearranged to avoid errors if package dirs don't exist yet)