Cleaned up code so that we are always writing a zip file. Might be a good idea to come back and rewrite this so that writing a new Resource to the index isnt so expensive.