What could be the reason why it wouldn't work with an USB stick inserted?
I mean, if you can fix that part, you'll be able to just write the key directly to USB stick..
And if you can write the key directly to the USB stick, it's possible to incorporate memdump with eEID_RKDumper, so that would mean only 1 pkg for dumping the flash and the key in one go..
Ofcourse next step would be to convert the CEX2DEX code into a PS3 app, and then you'll get one PKG to dump your flash/key, convert it to a DEX.. and yes you've guessed it already, if you then incorporate the flashing back the converted stuff, you're done..
So in all the hardest thing to do propably is converting the CEX2DEX code into a PS3 app as the rest is already available in some capacity in PS3 apps, but if CEX2DEX is based on purely selfcompiled code and not on using closedsource binaries it should be possible and propably not even that much work..
Sadly my knowledge still staggers on the using different libraries in C through enviromentvariables, so for the time being I can't be off help there until I wrap my head around that (coding C(++) itself isn't the problem)..