Sorting out discrepancy between HTML maxlength and JS character count

Fixes #53
Merge pull request #60 from theodi/bugfix-53-character-count

Sorting out discrepancy between HTML maxlength and JS character count