Resolved some problems

In some situtation it didn't create bit string. Now only when string is
created only of same character.
At getRank resloved problem calling method with index higher than
bitStringLength.