Directory auto-complete.

If the `else` branch is removed and you pass anything without a separator into the parameter then you get a panic. I felt it was important to protect the server from that and a separate branch seemed to be the clearest option.