Added testcase for random string generation. (Issue #69)

This adds a testcase for some of the discovered shortcomings in issue #69.