AppleScript or Automator workflow to clean orphaned files on Kindle
If the .mobi and .azw files are directly under the .sdr folders, try running a command like this in Terminal:

cd /containing/folder;for d in *.sdr;do ls "$d"|grep -Eq '\.(mobi|awz)$'||echo rm -r "$d";done


Remove echo to actually delete the folders.