Extended pageSet to interpret contents as functions

paperSize.header.contents and paperSize.footer.contents are now expected to be Strings containing a function declaration.
This enables using page numbers in the header and footer.
http://stackoverflow.com/a/17155529