boundary check problem for delete_dir()