Add image writing tests to imagespeed_test

You can't improve what you don't measure.