I have updated the script above and packaged it with rawlinsons comment count script into a small toolbox which can be found here.
Features:
* Posts and comments migration from sphpblog text files to wordpress database
* Fixes for images, urls and html formatting.
* Conversion to unicode
* Creates “page moved” for old sphpblog permalinks to correct wordpress post
* Comment counts update.
Enjoy, and always backup your wordpress database.