Fix security issues with archive extraction