Add cache flush API function for Immunet bb2538
Coverity: don't kill a thread that was not created
Coverity: close opened directory before function return