added image unit tests.  Added stage factory function to mocha runner