Small code refactoring

The purpose of this refactoring is to make code more pretty and more readable.

The refactoring includes next changes:

* Replaces obsolete `fix_siteurl` with new `ensure_url_format`
* Add tests for utils module.
* Add tests for markdown converter.