"$nid" for individual pages not working
As you are looking to edit/override node template, it is suggested to place your changes into node.tpl.php where you will get $nid as out of the box. page.tpl.php will not give you node variables by default.

If you still you want to get your code on page.tpl.php you can get $nid from url like arg(1).

Let me know if I miss anything!