Fix diy and python upgrade scripts

Resolve bug 1078804
Merge remote-tracking branch 'origin/logshifter/carts' into logshifter/carts

cially if it merges an updated upstream into a topic branch.