Adding assertSessionHasErrors

-Also removing newline from end of file
Merge pull request #681 from randomdrake/4.1

Adding assertSessionHasErrors