Play-off bound Derby pushed Barnsley closer to the Championship drop-zone with a 2-1 victory at the iPro Stadium.