Why remove the last character with sed? This breaks:
```
$ cat /etc/mesos/zk
zk://one:2181,two:2181/mesos
$ echo $(cut -d / -f 1-3 /etc/mesos/zk | sed 's/.$//')/marathon
zk://one:2181,two:218/marathon
```