Fix tests and batch_write_item to use Key or Item depending on Put or Delete requests.