sed creates residue temp files with the -i flag.
The command
$ sed -i s/search/replace/g
creates a temporary file in the working dir, named sed* and fails to clean it.
I have the same issue, each time i need to clean it manually or add a "rm sed_" or "del sed_" command
edit: i don't know why the asterisks are gone while finished editing this comment, but there is an asterisk after the "sed"s
FYI: This is a long standing sed bug related to the Windows implementation of "unlink".
The same issue in GnuWin, from April 2003: https://sourceforge.net/p/gnuwin32/discussion/74807/thread/32b30873/
From Dec 2009: http://stackoverflow.com/questions/1823591/sed-creates-un-deleteable-files-in-windows
Workaround for me on macos was to install gnu-sed with homebrew. I believe that was the solution, and then using sed -i ...... instead of sed -i.temp ...
On Windows the issue appears to be solved in sed 4.8. The one in Gow is still 4.2.1. It would be nice to update it.
In meanwhile the workaround would be to install a standalone sed, for example using https://community.chocolatey.org/packages/sed choco install sed