Update spriteGenerator.js

When references aren't found - task fails.

*Warning: Cannot call method 'forEach' of null Use --force to continue.*
Merge pull request #4 from Poplava/patch-1

Update spriteGenerator.js