AnimationParser.spriteSheet() properly calculates sprite layout.

AnimationParser.spriteSheet() wasn't taking the margin or spacing parameters into account when calculating the numbers of sprites per row/column, nor was it allowing for extra power-of-two padding at the end.