Changing how generateRandomString() is implemented to reduce number of failed tests

Tests were failing due to generateRandomString() sometimes returning a
string with a “.” in it (which is invalid in Firebase”).