Fixed a couple of bugs with potential memory leaks in the LRU cache class and a non-zero terminating random string generation method.