importer: fix parsing bugs

* case matters in strpos
* dupe detection was busted