Setting $managed_keys_directory = undef, rather than $directory.