Fix image size calculation bug.
Update image.sh demo to work with updated sketch.
Misc debug output and prettification.