Strip trailing whitespace for difflib Python 2.6/7 interoperability