Update .gitignore

- Added dirname flexibility
- Removed unnecessary declarations
- Added a few parameters