Choose ports dynamically

ran grunt test.
I tried that first and I kept getting errors. I think what was happening was that the promise returned by promiseCommand was <void> and so when I tried to pass something to fulfill it complained.