Make script directory detection more robust
Add .projectile to global gitignore