fix pathinfo bug