Make doEdit compatibile with extended Image class

Add a write operation for the $item as well to ensure that if the Image has an extension (like FocusPoint) changes are saved.
Merge pull request #23 from thezenmonkey/patch-2

Make doEdit compatibile with extended Image class