Fixed atlas bug for non-power of 2 atlases.
Merge pull request #2 from Banbury/master

Fixed atlas bug for non-power of 2 atlases.