Use Array.join() rather than String.+ to create file contents.

Summary:
It's much faster.

Stop ruby from doing worthless cleanup right before it exits.

Well, we do need *one* bit of cleanup before exiting...

Test Plan:
Ran
   ruby build/pack.rb ~/khan/stable/khan-exercises/exercises/division_*.html
both before and after the change, and verified there are no diffs.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D2090