Updated and more correct port finding.

This will handle the new style config file, the old style config file, and deployments where Galaxy is started with a completely different config file using the -c option.
Merge pull request #29 from jmchilton/fix_port

looks good to me!