Issue 4368045: Fix upload.py -r N:M failure on new directories, by Arkadi Shishlov.
Issue 4368045: Fix upload.py -r N:M failure on new directories, by Arkadi Shishlov.

Update issue #189
This fixes the use case with files:
  python upload.py --rev 77:120 -- codereview/engine.py
but leaves the following open:
  python upload.py --rev 77:120 -- codereview/

kscharding/integral-solutions-smxq,fuzan/rietveld,google-code-export/rietveld,Koulio/rietveld,dushmis/rietveld,v3ss0n/rietveld,sajingeo/rietveld,berkus/rietveld,gavioto/rietveld,nbodepallictr/touchites-codereview,arg0/rietveld,xtypebee/rietveld,andyzsf/rietveld,draem0507/rietveld,robfig/rietveld,nareshboddepalli/touchites-test,DeanHere/rietveld,foolonhill/rietveld,sajingeo/rietveld,nareshboddepalli/touchites-codereview,v3ss0n/rietveld,v3ss0n/rietveld,berkus/rietveld,nbodepallictr/touchites-codereview,foolonhill/rietveld,robfig/rietveld,gco/rietveld,nbodepallictr/touchites-codereview,gavioto/rietveld,nareshboddepalli/touchites-codereview,xtypebee/rietveld,aungzanbaw/rietveld,xtypebee/rietveld,kscharding/integral-solutions-smxq,draem0507/rietveld,google-code-export/rietveld,salomon1184/rietveld,fuzan/rietveld,ericmckean/rietveld,arg0/rietveld,DeanHere/rietveld,robfig/rietveld,supriyantomaftuh/rietveld,gavioto/rietveld,aungzanbaw/rietveld,arg0/rietveld,aungzanbaw/rietveld,ericmckean/rietveld,rietveld-codereview/rietveld,openlabs/cr.openlabs.co.in,sajingeo/rietveld,Koulio/rietveld,kscharding/integral-solutions-smxq,rietveld-codereview/rietveld,ericmckean/rietveld,rietveld-codereview/rietveld,salomon1184/rietveld,rietveld-codereview/rietveld,Koulio/rietveld,gco/rietveld,nareshboddepalli/touchites-codereview,dushmis/rietveld,draem0507/rietveld,andyzsf/rietveld,berkus/rietveld,nareshboddepalli/touchites-test,nareshboddepalli/touchites-test,openlabs/cr.openlabs.co.in,salomon1184/rietveld,gco/rietveld,supriyantomaftuh/rietveld,nbodepallictr/touchites-test,andyzsf/rietveld,foolonhill/rietveld,nbodepallictr/touchites-test,openlabs/cr.openlabs.co.in,DeanHere/rietveld,dushmis/rietveld,google-code-export/rietveld,nbodepallictr/touchites-test,supriyantomaftuh/rietveld,fuzan/rietveld