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.

Without this fix in place, it looks like the build succeeded (no error is returned), but when then I try to request it by ID it fails.