Hearts picked up a second successive win in the Scottish Premiership after claiming a 2-1 victory over 10-man St Mirren.