importDump.php should have a parameter to add a prefix to the page titles of imported revisions. E.g., it might be desirable to import everything to subpages of User:Foo/Imports/ rather than to mainspace.
I'm going to try to do this using a --rootpage parameter as opposed to an arbitrary prefix parameter, as you suggested in the previous changeset which this was attempted:
This would be better implemented as --rootpage, not --prefix. It should call ->setTargetRootPage on the WikiImporter object in the importFromHandle function. Unless you really want arbitrary prefixes...
If you'd prefer a parameter which accepts an arbitrary prefix, just let me know.