Scotland recorded their second win of the Autumn Nations Series despite an unconvincing display in the 59-21  win over Portugal.