Now accepts tcp:// or unix:// URIs and cleans up any socket file correctly.