modified pathutil and added test