Improve support for running the router on a non-standard port.

This is mostly a fix for https://github.com/andreacampi/cloudfoundry-vagrant/issues/5 but it's probably a good idea anyway.