Modify pkg_names to handle comments at the start of the line