Spritesheet generator in node.js