Wire run_for to setup()

* run_for in frameworks now call the setup() with the optional destdir
* Modify tests to ensure that setup() is called
Better way to detect if category or framework

This fixes a bug when category in main triggered an AttributeError in setup()