close factory directories when done with them
Revert "delay test execution until factories loaded"

This reverts commit c40133acb85a560f9a95801e16ab769cf28b2155.