Unarchive should work when parent directory is not writable

Correct unarchive so that the checks for writeability are
sensible.

Added a test for when parent directory is not writable
Merge pull request #8441 from willthames/unarchive_dest_fix

Unarchive should work when parent directory is not writable