fix(tests): Allow TLS

Fixes https://github.com/deis/deis/issues/2230, most code from https://github.com/docker/docker/blob/master/docker/docker.go