network: Escape object paths

So we don't crash on e.g. cockpit0-nic which contains '-', a
disallowed character in DBus object paths.