Some changes to export script

This one now exports all pages in documents and uses page names for naming files.