Cleanup URL parsing and support remote Docker API endpoints