More flexible pagetools icon builder

This should allow 3rd parties to more easily create their own icons for the pagetools.

This is the missing code for #812