nso_rebuild_px_index function

Rebuild PXWeb index and optionally write to a file