Coverity fixes

Fixes issue [#10472](http://trac.mantidproject.org/mantid/ticket/10472)

Tester: Nothing to test really, just a code review that the changes address some of the newer coverity warnings.