Change exception formatting and if statements

Formatting the exception messages like this will make the transition to
py3k easier.