Fixed a bug in the week command, minor optimizations

Back when ytsm was still called yt-client.sh and the idea of putting
this on GitHub even occurred to me, I rewrote all of ytsm's main
functions by putting $OUTPUT into calculate_output() and a few
slight changes to a copy-pasted while loop. I apparently pasted this
loop into the week command's code block, but completely forgot to edit
it to read the date from the feed file, rather than from the $DATE
variable. The result is that the week command behaved exactly like the
all command.

I also moved the line that generates the line count of the feed file out
of the while loop on both week and all, so it only runs once instead of
$(wc -l $OUTPUT) times. According to my stopwatch, the all command now
executes about 25% faster (5.9 secs vs. 7.8 secs).