https://bugzilla.wikimedia.org/show_bug.cgi?id=54553
--- Comment #10 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I should have explained the patch clearer. Sorry.
Relative link is disabled on main namespace of Wikipedia because subpage feature is disabled there (See http://en.wikipedia.org/wiki/Wikipedia:Subpages%5C). For example, on main namespace of Wikipedia, if you write [[/b]] on page "a", it will produce a link to page "/b". However, if you do the same thing on another namespace or another family, it will produce a link to [[a/b]]. I just write the code to simulate this behavior as much as possible.
For os.path problem, I will fix it soon. Thank you for noticing this problem much. :-)