Hi, I think we spoke via email but I'll post our discussion here too in case anyone else has the same question.
The code you’ve posted below is for Sitefinity 3.7, and is not compatible with the latest release. If you're using SF 4 or higher, you’ll want to use the new API.
Sample code for creating and saving pages using code is available in the documentation: http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/pages/creating-pages
You can either use the standard PageManager API or the FluentAPI, both methods are explained and have sample code in the page linked above.
You could put execute this on a blank webforms page (create a test.aspx page and put it in the code behind) and run that page to execute it. You can also place it in a user control (ascx file) as a widget and drop it on a page to run it.
Alternatively you could wrap it in a module, but this is more advanced and probably only necessary if you need something reusable. For more on module creation take a look at the testimonials intra site module example: http://www.sitefinity.com/documentation/documentationarticles/developers-guide/how-to/how-to-create-a-testimonials-intra-site-module
Hope this is helpful!