Move clear tmp dir hack to bootstrap impl