add repalcePathSeparator

This `repalcePathSeparator` reduces the code size, and useful to support multi platform environment.

TEST=./grind tests