[MAINT] Add unit tests for subimage extraction.

This fixes PR #87.