A 19th-century railway goods shed in Darlington which is now part of a major visitor attraction has officially been saved.