#1020: Fix generating of filenames when packages contain an underscore