Add support for TMPDIR locking