Remove obsolete imports.
Self-tests for regex matching.

Also tighten exception handling around file opening.
remove unwanted characters, like spaces from tag name
Merge pull request #125 from dmitry84/master

remove unwanted characters, like spaces from tag name
Don't include : as allowed character after link.

It should be, but we have code that generates this text
from cf-sketch and leads to false positives.
Implement support for simplified linking inside same document.

[text][#section] becomes [text][current_title#section]