Fix the formatting of error docs of removeDirectory (#8509)