I wouldn't say that a single broken strand on a new brake cable would render the bike "totally unsafe to ride," but if it is an option you should bring it back to the shop and have them replace it. This might be a sign that whoever put this bike together or inspected it for sale doesn't have a very thorough shop ethic. If they were careless enough to install a brake cable incorrectly, there may be other - more serious - oversights which can add up rather unpredictably. Not totally unsafe, but not ideal for a new bike.
In any case, brake cables are cheap and should be replaced at regular intervals.