Rough cut
Use `@base_dir` instead
Fix wrong out_dir and ensure JSON index file is read into memory
Use `Pathname#open` like `#generate` instead.
Call `#generate` first to make sure the JSON index file exists
Ensure gzipped file is also generated
Use GzipWriter to open and write to the file
We might as well gzip all of the javascript files in this directory.
Merge pull request #334 from zzak/json_index-generate_gzipped

JsonIndex#generate_gzipped