This fixes a bug when trying to unpack an image
that has weird permissions such as non-writeable
directories by the owner. It also fixes some
cleanup for those same kinds of cases.
Coverage increased (+0.03%) to 78.434% when pulling c09351b1f712752f83f5826a73ec5ad53a29e3e6 on scanon:fix_perm_issue into 771dcc40c7c01e6ebe8f5540502e67b703863164 on NERSC:master.
This fixes a bug when trying to unpack an image that has weird permissions such as non-writeable directories by the owner. It also fixes some cleanup for those same kinds of cases.