[client] Fix rename problem on Windows and Mac.

The case is that a file/dir's name changes in cases.