GEOS-6394 import can fail on windows

Due to file locking, when uploading a zip file, the file can fail to be
deleted and is erroneously scanned as part of the import causing an
unrecognized task.

Also added additional checks for deletion failure to ensure an earlier
failure.

(cherry picked from commit b6b0f65049be5ee3b1f3b3387a2dcdf4bab41155)