Monaco preserved their three-point gap at the top of Ligue 1 after a testing 2-1 victory at Guingamp.