Replace the last rand() with mt_rand()

Better entropy, faster.
Also fixed a few "it's" typos.
Merge pull request #2686 from vlakoff/develop

Replace the last rand() with mt_rand()