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)

Personally, I think we should remove this function, and just make people use built in random functions. PHP has various functions, some quicker than others.