Changed some variables' storage location

The language counters and the list containing unknown extensions are now
internal instead of being in the YAML file. Also added some
documentation, in form of both comments and a more descriptive
docstring. Deleted some unused methods. Also the current directory can
now be passed as an argument to Polyglot