fix path for a build

/buildWithParameters is only correct if the build is parameterised (i.e.
if params is not nil). If params is nil, we should be hitting /build on
Jenkins.