Add WriteDependencyFile helper.