Retake status file lock if an error caused it to be lost (for WebJobs).

Fixes #1340
so the `base.ReportStatus(status, logStatus)` below will not fail if _lockedStatusFile is null.