Better code path handling during upgrades
Better code path handling during upgrades

While building a upgrade package rebar will add new paths to the
internal erlang path, these paths and their order have effects on how
the package is built. This patch should fix some corner cases where a
user can receive a "undefined application" error.

csyangchen/rebar,wcy123/rebar,thomasbhatia/rebar,paulo-ferraz-oliveira/rebar,lrascao/rebar,beni55/rebar,saleyn/rebar3,K2InformaticsGmbH/rebar,shkumagai/rebar,syl20bnr/rebar,jbalint/rebar3,lpgauth/rebar,jacktang/rebar,kellymclaughlin/rebar3,matwey/rebar,macintux/rebar,choptastic/rebar,jacktang/rebar,matwey/rebar,erlang/rebar3,rebar/rebar,rebar/rebar3,macintux/rebar,bsmr-erlang/rebar,lpgauth/rebar,GabrielNicolasAvellaneda/rebar,thomasbhatia/rebar,choptastic/rebar,apache/couchdb-rebar,dcarastan/rebar,GabrielNicolasAvellaneda/rebar,thomasbhatia/rebar,cloudant/couchdb-rebar,apache/couchdb-rebar,apache/couchdb-rebar,shkumagai/rebar,processone/rebar3,djnym/rebar3,blt/rebar3,heroku/rebar,rebar/rebar3,norton/rebar,sile/rebar3,norton/rebar,CMoH/rebar,beni55/rebar,evnix/rebar,syl20bnr/rebar,GabrielNicolasAvellaneda/rebar,evnix/rebar,jbalint/rebar3,beni55/rebar-1,scatterbrain/rebar,cloudant/couchdb-rebar,norton/rebar3,syl20bnr/rebar,lpgauth/rebar,surik/rebar3,deadok22/rebar,bsmr-erlang/rebar,platinumthinker/rebar,oubiwann/rebar,CMoH/rebar,beni55/rebar,linearregression/rebar3,vladdu/rebar3,csyangchen/rebar,lrascao/rebar3,linearregression/rebar3,fauxsoup/rebar3,surik/rebar3,csyangchen/rebar,platinumthinker/rebar,evnix/rebar,basho/rebar,RubberCthulhu/rebar,fabiankrol/rebar3,scatterbrain/rebar,oubiwann/rebar,dcarastan/rebar,bsmr-erlang/rebar,lrascao/rebar,norton/rebar,K2InformaticsGmbH/rebar,zugolosian/rebar3,CMoH/rebar,heroku/rebar,beni55/rebar-1,matwey/rebar,macintux/rebar,paulo-ferraz-oliveira/rebar,bsmr-erlang/rebar,rebar/rebar,platinumthinker/rebar,project-fifo/rebar3,SiDen/rebar,matwey/rebar,K2InformaticsGmbH/rebar,walrusVision/rebar3,SiDen/rebar,basho/rebar,benoitc/rebar3,zugolosian/rebar3,SiDen/rebar,scatterbrain/rebar,project-fifo/rebar3,sile/rebar3,jacktang/rebar,K2InformaticsGmbH/rebar,K2InformaticsGmbH/rebar,fishcakez/rebar3,matwey/rebar,norton/rebar,dcarastan/rebar,shkumagai/rebar,lrascao/rebar,fabiankrol/rebar3,ferd/rebar3,RubberCthulhu/rebar,rebar/rebar,paulo-ferraz-oliveira/rebar,wcy123/rebar,fauxsoup/rebar3,cloudant/couchdb-rebar,walrusVision/rebar3,lrascao/rebar,benoitc/rebar3,choptastic/rebar,processone/rebar3,lrascao/rebar,tsloughter/rebar3,oubiwann/rebar,deadok22/rebar,blt/rebar3