Improvements to listpages.py

1. Structure of listpages.py now like in other scripts.
2. Removed uneeded except part which caused bad output.
3. Fixed typing error. parameterd -> parameters

Change-Id: Iacc0e929482b4baac12a078bdc9faf813f773444
Merge "Improvements to listpages.py"