Fix array beyond bounds error when dropping a single image back in

Fix a crash in the case of a single image caused by a "index 1 beyond
bounds for empty array" error when dragging the only image outside the
scrollView and then dropping it back in.
Fix typo in last commit

Fix typo in last commit, should ofcourse have been 0 instead of
newIndex.
Merge pull request #10 from MartijnvanderWoude/fix-beyondboundsdragdrop

Fix array beyond bounds error when dropping a single image back in