Fix some bugs creating the PBI-INDEX file when the module may have
unncesssary line-breaks in it