trim trailing slash for error reporting on jobs

-add global function to utils for trimming trailing slash
-trim trailing slash for error reporting on jobs page