/run PetRename("NAME HERE")
You need the parentheses and the quotations. Name goes inside. It's permanent so choose carefully. You can't rename it. This may get fixed soon and is unpublished but well tested on the mage class forums on the Oboards.
PS: I named mine Drips.
PSS: I freakin love Frost Mage since 4.0. It's an alt that has gear from the way back when machine in Nax/Uld that I quit playing when my raid guild needed a Ret pally but "Falling in love again...." Frost was always my fav spec back since Vanilla.
Mostly doing PvP atm but feels good to be frosty baby.