Accommodate Windows bug on file deletion

## Context
Sometimes, the ```delete()``` method on a file does not work properly on windows platforms.

## Description
Now, when we delete a file, if the file is not really deleted, we call the garbage collector and wait a little before trying again to delete the file.