[FIXED JENKINS-15806] - Fail build on failed pull

This is an update to pull requests #31 and #40.  The code is modified to check the return code of 'hg pull' and fail the build if it doesn't run successfully.  A new test has been written to ensure that this failure is reported correctly.