Now uses LOCKSDIR variable for the path to locks.