Bug fix + .gitignore/.gitattributes + code-reformatting

Of these items, the only big one is the bug fix in the detectLanguage method:
There was a space in one of the extensions - 'htm ' should have been 'htm'