Automatically generate suitable .gitignore in packages directory