Michael Duffy’s goal combined with a vital save from Brian Maher helped Derry City secure a much-needed victory over a battling Sligo Rovers side.