Move reusable code to getMWVersion.php

Create replacement wrapper to getMWVersion.php at getMWVersion

Change-Id: Ieb80f75c7262bcdbfbb85b5f8f6699cab45c0255