Fix the upgrader so it actually works and doesn't crap on Settings.php

Signed-off-by: Yoshi2889 <rick.2889@gmail.com>
Merge pull request #1892 from Yoshi2889/upgraderfixes

Fix the upgrader so it actually works and doesn't crap on Settings.php