Fixed parsePathString method a bit.