結果 : check if string is a valid path python