'Scan base images in base_dir and call _store_image or
_store_swap_image on each as appropriate. These methods populate
self.unexplained_images, self.originals, and self.back_swap_images.'

def _scan_base_images(self, base_dir):

    if six.PY2:
        digest_size = (hashlib.sha1().digestsize * 2)
    else:
        digest_size = (hashlib.sha1().digest_size * 2)
    for ent in os.listdir(base_dir):
        path = os.path.join(base_dir, ent)
        if is_valid_info_file(path):
            pass
        elif (len(ent) == digest_size):
            self._store_image(base_dir, ent, original=True)
        elif ((len(ent) > (digest_size + 2)) and (ent[digest_size] == '_')):
            self._store_image(base_dir, ent, original=False)
        else:
            self._store_swap_image(ent)
