Fixed errors relatd to deleting files on Windows