Add configurable port for testing

Make sure the port is a number even when it comes from an environment
variable (which is a string).
Merge pull request #6 from VirtuOz/make-port-configurable-for-tests

Add configurable port for testing