pub fn write_binding(data_dir: &Path, id: &HardwareId) -> Result<()>
Replaces the binding; an empty id removes it.