pinoc- that is a good suggestion, I will add it into the script.
travis, something which only occurred to me later... 
after testing for the kdebase4 rpm we know for sure to have either a KDE4 or a KDE3 install, since there are mutually exclusive. At that point the dialog " You appear to have the KDE4 desktop..." is redundant and probably better to remove completely in order to avoid people not reading the message properly and eventually even clicking the wrong button...
+1 The lower the possibility for user error, the better.