Fix for insert_image() issue in 'in_memory' mode.

Fix for missing images in in_memory' mode. Issue #102.