Don't override empty opts.port

This tests for and addresses issue #156.