Add helper to generate random string to make testing easier

This one is the second splitted PR. It just contains the feature for random_string + fixed merge conflicts. Is based on the work in #186.