Fixing problems with current jenkins version

* Fixed certain small issues
** Check for FINISHED or FINALIZED phase
** Use job_url to find lastFailedBuild, because a job name can contain blanks
** Look for the correct username (in case we use authentication '/user/' finds the logged in user and not the commited by user name)