Rabat finishes ahead of teammate Espargaró