Fixes accidentally submitting invalid/missing file
Closes edit mode when clicking 'save'

Item.prototype.updateContents takes a parameter for a success callback,
which (optionally) gets passed to putItemAttribute and evaluated on
success.

The submit binding on the item form calls an anonymous function which
calls updateContents with $root.cancelEdit as the success callback.