more complete implementation of join_paths
Added a simple $[link] directive

* The issue is that normal makdown links []() will not resolve path
* When the markdown snippet is embeded the link's path might not be
* correct