fixed bug in parentpath/dirname funcjs