Would these tests have failed with the old code?  IIUC you're fixing the case where there's a dot in the path and there's no extension.. right?  That makes sense as a (relatively serious!) bug.  It should be called out in the ticket.  Frankly, it deserves its own ticket and change and it shouldn't be rolled in with a cleanup refactor.