Here are a couple of links that delve into the regulations for storing black powder, courtesy of the ATF and the GPO.
http://www.atf.gov/explosives/how-to...uirements.html
http://ecfr.gpoaccess.gov/cgi/t/text...3.5.11&idno=27
The rules apply to licensees - not to the end user. I suppose, though, that if you've got more than 50 pounds of black powder sitting around, you might raise a governmental eyebrow or two.
As anecdotal evidence, when I visited Buffalo Arms, all of their black powder was in type 2 magazines - wood-lined shipping containers, like the ones that the big ships carry. If I recall correctly, they were a pretty fair distance from the building and from each other - something like 100 feet or so.
As somebody mentioned above, it doesn't appear that the function of the magazine is to contain an explosion, but, rather, to prevent an explosion from happening. And, of course, to keep the contents from being stolen.