Redmine #6441: Fix software_packages.csv being regenerated every time.

Do not allow '\r' to make it into the package string. If the package
manager puts '\r' at the end of the lines, it will cause later
comparisons to fail, so make sure to filter it out.