Fix file scan

Now also works if there is a file (e.g. `chapter1.tex`) with the same name as a project subdirectory (e.g. `chapter1`).

Before, the file scanner would return the directory name instead of the file name.
Run makeglossaries instead of makeindex if `base.glsdefs` exists

Also add a basic parser class (MakeGlossariesParser) for this command.
Set default encoding (in python script) to UTF-8

This is required when building LaTeX files with non-ASCII names.
Update how we ensure generated labels are ASCII (in snippets)

We now use TextMate’s asciify transformation which does a better job (and is less arcane) than the custom regexp.