make sure we don't divide by zero.

This will not happen currently, but if the size of the string becomes
dynamic, than it will be a real issue.
Merge pull request #98 from robertmaynard/possible_divide_by_zero

make sure we don't divide by zero.