refactoring to allow global prepare/cleanup steps to run

Currently, they are used to build and cleanup the EasySandbox
shared library.  Seems to work.