Handle .local files in generate-agent-pack.sh script