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.