Improved PathButton directory finding method