Method getPathInfo() does not contains context path which causes index out of bound error if there is any context path.
Improve the way upstream repositories are used.

Previously, 'upstream' would just use the url 'latest'. However, that
leads to instability, as if you repeated the build downstream you might
get 2 different builds, and it's difficult to see why one might fail.

Instead, stamp into the build the exact repository, so this can be
successfully traced. Also fix the repositoryChain behaviour.


Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
Merge pull request #13 from lvotypko/out-of-bound-error

Index out of bound error