Refine chroot locks
Remove some debugging env var guards
Lock get_temp_file_path
Remove some locks