Update spriteGenerator.js

When references aren't found - task fails.

*Warning: Cannot call method 'forEach' of null Use --force to continue.*