I know I'm a bit late here but perhaps the script should remove each individual file and then check if the directory is empty before deleting it. There has been quite a lot of complains in the newsgroup about the Windows installer that removed a complete directory, including files added by the user.