Bugfix for long random strings and more randomness

Bugfix to allow long random strings (> 5*26) and more randomness (string with length=10 must allow 10 times the same chars)

This is quite inefficient. We really need `1+ceil($length/62)`, or something similar.