Corrected exception handling to account for skipped images.

If the compute_average function skipped one or more images, the resulting average image would still have been divided by the length of the list of image names (and therefore the resulting average image would be darker than expected.)  I've added a skip counter to allow for proper handling of skipped images.