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.
fix buildWithParameters URLs - logic was reversed
Merge pull request #1 from DanielBryan/master

fix path for a build