Correct unarchive so that the checks for writeability are sensible. Added a test for when parent directory is not writable