re-apply fix bug 1038777 - keep lock in /var/lock instead of /tmp

This reverts commit 2d4d12049c3bd9c0c6ef03a36353c5a643b6a1ad.