Shameless plug!
I've forked yifanlu's KindleTool on
github. It's a work in progress aimed at getting it to run properly on Linux. As a side-effect, it's probably utterly broken on OS X/Cygwin

.
Right now, it should mostly work, but I haven't actually looked carefully at the output/tested anything on the 'create' front. I'll do that tomorrow

.
In the mean time, I'm open to comments/patches/bug reports

.
Keep in mind that I'm basically useless at C, so, err, be gentle

.
(And when I say useless, I'm barely exaggerating:
h 1 | grep "make debug" | wc -l == 196
h 1 | grep "Debug/kindletool" | wc -l == 268
Add to that a few build/runs through kdevelop when I was playing around with it

).
Once we're more or less sure it's okay, I'll send a pull request.