Move pagegenerators script function to listpages script

Change-Id: Iea4890f838fb4b81f110a2d4bbd7975d6156122c
Merge "Move pagegenerators script function to listpages script"