Update gitignore
Add gitattributes
Fix scanner throwing exception after stdin closed