Changing the method would be a step towards making the script OS agnostic which is something I would think is a goal. Even if the code wasn't DRY'd out but instead copy/pasted from the other PR it would be an improvement.