app: use modified version of python's os.renames that doesn't prune
app: use modified version of python's os.renames that doesn't prune

os.renames will silently delete directories, from the docs [0]:

After the rename, directories corresponding to rightmost path
segments of the old name will be pruned away using removedirs().

This caused the deletion of /var/lib/securedrop/store in #5031

Instead, let's use a modified version of os.renames that doesn't
prune.

[0] https://docs.python.org/3/library/os.html#os.renames
[1] https://github.com/python/cpython/blob/master/Lib/os.py#L250

conorsch/securedrop,conorsch/securedrop,conorsch/securedrop,conorsch/securedrop,conorsch/securedrop