Fixed a bug in Notice::Pages and added a feature

When publishing a new page sometimes all that would be created is
SCALAR(0x123456)
or something like that. The filename would be ok.
Sorting the templates alphabetically