Deployment: don't keep the lock file open across exec
Add encrypted links test.

Mostly written by Rob