fix(files): lock a stored path while storing and deleting it
Identical contents share a path. A copy stored while the last other copy was deleted could end up as a row without its bytes; checking for the bytes and inserting the row, and checking for other rows and removing the bytes, now hold a lock of the path.