Fix the bugs of Directory, now RemoveFileTask runs successfully.