Mobiunpack (scroll down to post #5 for the latest version and an AppleScript wrapper). It also outputs images and an OPF file, though no NCX so you'd have to rebuild that by hand.
If you're feeling ambitious, you could also try installing the Perl
EBook-Tools from CPAN.
Hope this helps, and welcome to MobileRead!