Fix the enabling and disabling of the Clear button once and for all
Fix a minor logic flaw in considering the directory of a file to match the search criteria; controls are disabled during the searching, hence we can't check if they are enabled or disabled on the run that easy