fix for issue #761: handle unicode correctly in summary for Markdown

This fixes issue #761. Explicit ``str`` call when generating the ``summary`` for Markdown files was causing problems with non-ascii text. This fixes it and also adds a new test case for non-ascii metadata handling.

This also fixes a minor bug in ``log`` module. It wasn't handling cases with non-ascii file/path names correctly in Python 2..