fix rm_r and file_exists functions in libericstools, swithc stat =>lstat