Use temp dir for server side locks (#4918).