To remove one redundant conditional statement

Function "CleanDir" will check if dir exists.
Merge pull request #1943 from PeterWangIntel/redundant_conditional_statement

To remove one redundant conditional statement