Fix file indexing in ImageCollection
Fix handling of singleton frames in pil_to_ndarray