Rotherham beat 10-man Sheffield Wednesday 2-1 in their south Yorkshire derby in the Capital One Cup first round.