Fixed how editing an item modified its index.

Fixes #6. This, albeit quick-and-dirty, fix makes it so after we edit an
item, it is placed at the end of the list, then removed and placed back
in at its original location.

A better fix would be to alter the add item form to allow for edit
functionality, or at least to accept an index parameter.