move pathutils to separate module