Thanks Ciromattia. I've finally got it to work.
A couple of suggestions: First it'd be nice if it just uses directory name from the source file, instead of asking with a pop-up window with pre-filled source file name.
Second, is it possible to get rid of the kindlegen dialogue window?
These two are in my way of processing multiple files at once without interruption.
Again, thanks for the nice work!