Added dirname flexibility to .gitignore parameters