Test availability of thin and websocket ports before start.
Test availability of thin and websocket ports before start.

Improving cmd line scanning, handling thin options in front of
-p <port>. Also clean up test usage, just use if/then and [].

Muhannes/diaspora,Amadren/diaspora,Amadren/diaspora,geraspora/diaspora,Muhannes/diaspora,geraspora/diaspora,spixi/diaspora,Flaburgan/diaspora,Amadren/diaspora,KentShikama/diaspora,Muhannes/diaspora,jhass/diaspora,despora/diaspora,Flaburgan/diaspora,KentShikama/diaspora,diaspora/diaspora,spixi/diaspora,jhass/diaspora,diaspora/diaspora,Flaburgan/diaspora,spixi/diaspora,jhass/diaspora,jhass/diaspora,SuperTux88/diaspora,diaspora/diaspora,KentShikama/diaspora,Muhannes/diaspora,Amadren/diaspora,geraspora/diaspora,despora/diaspora,SuperTux88/diaspora,SuperTux88/diaspora,spixi/diaspora,geraspora/diaspora,Flaburgan/diaspora,despora/diaspora,diaspora/diaspora,despora/diaspora,SuperTux88/diaspora,KentShikama/diaspora