The Scottish government has contributed £11.6m towards a £14.75m flood defence scheme for a Perthshire village.