Mark Duffy's free-kick earned 10-man Doncaster a 2-1 victory over bottom side Yeovil in the Sky Bet Championship.