Make location header comparison permissive for 2.x
Fix unicode error when traceback has non-ascii