Doesn't overwrite config on upgrade.
Fixes a typo in if statement.
Places db_stop at the correct place inside the if statement.
Merge pull request #12 from turint/master

Doesn't overwrite config on upgrade.