Some minor tweaking here and there...

Added an encoding clearance - I was having problems importing posts that had accented characters (even though they were correctly exported as UTF8). I forced some enconding.

Added an if statement for blog categories... there were some categories that were returning a NIL after the first... Not really sure why... never the less, the if statement lines ~170 seemed to fix it.

Finally - I added a prefix parameter. 
My Refinery Blog adds a prefix to the tables by default (on all blog installs I have - I have the "refinery_" table_prefix.
This version imported quite seamlessly a relatively simple blog.