Fix for issue #50 - ports remapping on server/docker restart

This fix ensures the postgresql commands inspect docker for the correct port, rather than stashing the port number in a file. If the server reboots, docker won't necessarily reassign the same port to the container. 

Also includes a slight refactor for getting the ID of a container.