Default socket and web ports to available ports.

Fixes #31.