Refactor random_string/2
Merge pull request #373 from gjaldon/refactor-random-string

Refactor random_string/2