Bug 1 - import script tries to import articles which start with lower-case letters, what might lead to clash.
Fix attached.
Bug 2 - import script has some single quotes escaping problem, and articles with single quotes in name are not added to "linked" table, and therefore are listed as not linked despite of being linked.
I couldn't find where the bug is.