Greatest common divisors of u−1, v−1 in positive characteristic and rational points on curves over finite fields