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

Fixes #1340
Should we set _lockedStatusFile to null?