[FIXED JENKINS-18390] -P did not work with -Q; implementing prune manually.
Merge pull request #21 from jglick/JENKINS-18390-prune

[FIXED JENKINS-18390] -P did not work with -Q