core: Properly cache exception timeperiods with multiple timeranges

An extra newline had snuck in there, making it impossible for the
CGI's to understand timeperiods with exceptions and multiple
timeranges, so a timeperiod with an entry like this:

	august 1	07:30-12:00,13:00-17:00

would get written to the cache file as

	august 1	07:30-12:00,
	13:00-17:00

which obviously doesn't work too well. This patch corrects that
oddball behaviour.

Signed-off-by: Andreas Ericsson <ae@op5.se>