Convert package names to valid identifiers in output file.