`setup_tests()` expected BLUEPRINTS_DIR to be set, but it wasn't when running in automated mode (with $CLI set). Fix this and move share and blueprint dirs to function arguments.