refactor(unit): Break out dbus path serialization and test it