Add image writing tests to imagespeed_test