Lock the batch for update, so that one uploaded file doesn't overwrite
changes made by another file. Fixes #297