Moving gen_random function to session.cpp. (#212)
Passing c-string (char*) representation of session id to snprintf. (#212)