Custom slugify fix

- Encode id as utf-8 before quoting so you don’t end up with an empty id
Unicode and logging changes

- CSS and JS can have encoding specified per file (via special
notation).  If included, this will be used to read in the file, else,
in the case of JS, it will be used as the charset attribute for the
external link.  CSS should define its encoding in the file.
- Encoding of from CLI is used to read all Markdown source (references
also use the same CLI encoding).
- Output currently is UTF-8 unless the template specifies a different
encoding.
- Logging is now done with the logging lib.
- Consolidated reading resources code.