Add test-image command

Add initial implementation to test an image.