Improve UpdateMath script

* add more options
* use parser function to get the math tags form the wikitext

Change-Id: I7dad55f35b6d7fc633390ce0ffd47abfd4112301