Revert "Got rid of lockfile."

This reverts commit f615f85a6fe2e997ef9b7d93bb9211db28c7d1cf.