Added an image-based testing facility

First and only layout test here is wrong, but the framework is ready.