Instead of using string interpolation, use `os.path.join` in all places. This should allow the use of `os.PathLike` objects as well as bytes (i.e. `objectstore.PathLike` types) to be used and is generally cleaner.
bwrap
dir_fd
os.scandir()