The charity has acquired Bass Rock and Craigleith islands in the Firth of Forth from the Dalrymple family.