Fix a bug in findAvailablePort

Change-Id: Ic19cd544a452d153b05ccfaec8ccc0f8ade1dd8f
Reviewed-on: http://gerrit.aldebaran.lan/46059
Tested-by: gerrit
Reviewed-by: pdaouadi <pdaouadi@aldebaran-robotics.com>