Fix case insensitive matching
Try twice to remove a directory on windows because sometimes it fails due to temporary locks
Capture output of the rm command