St Mirren booked their place in the Scottish Communities League Cup semi-finals after a 4-2 spot-kick win against Aberdeen.