Fix the string comparisons which can be affected by the users ignorecase

setting. This includes changes to comparisons which are insensitive to the
ignorecase setting but it's important to be consistent to avoid ambiguity.

Note: The only broken comparison actually fixed is on line 86. This resolves
issue #11 that I opened when I noticed the problem.