None "mel scripter" advice here:
Make sure randKey.mel is in your scripts folder. Some folks use mel to source the script, but I simply restart Maya. Sometimes a script still wont work, in that case I open the .mel script in a word editor, then copy and paste all the text into the Maya script editor, then make a shelf button by selecting the text in the script editor and middle mouse dragging it to a shelf.
Being a windows user, I like to keep all my scripts in the general scripts folder one level above the version specific scripts folder. That way I know all my scripts are in the same place when I unstall an earlier version.