Deal with asynchrony when loading images in CLI

This change hopefully fixes #17 by waiting for the images to be loaded before doing the diff.

There's some error cases the script doesn't catch, and a rather awkward CLI syntax (`diff` not `--diff`), but that's for another change to deal with.