Fix persist of empty indexes in index generator job
fix according to code review
Merge pull request #229 from metamx/fix-index

Fix persist of empty indexes in index generator job