Change symlink breakout detection logic in archive package

Fixes #9375