Fixed .gitignore

added method to remove invalid paths