Re-sync OOjs and OOjs UI update scripts

Import the changes in 674b2458a25 in the VisualEditor repository where these scripts
were first created (and are still run for non-MediaWiki users).

Commit message in that repo justifies.

Change-Id: I711f3c88cbc1916f3b782771095304b186f7405f
Merge "Re-sync OOjs and OOjs UI update scripts"