Replaced rand() with mt_rand()

mt_rand — Generate a better random value.

Excuse me, I laughed for quite a bit after reading this. Fixes #2