Literary adaptations for TV and movies of the likes of The Buccaneers and Outlander have provided some of Scotland’s heritage sites with a welcome financial boost as fans flock to filming locations.