Trac #15178: FTP TLS not working

Trac Ticket: http://trac.xbmc.org/ticket/15178

Here is a little fix for this problem, I have compiled and tested it on my machine.

I would appreciate, if you can merge this pull requests in the master and Gotham branch.

Best regards,
Christian
And maybe the outside function is relying on them being removed? (devils advocate)

Notice that it's intentional that url2 is altered in this function in other ways (the protocol is changed).

I agree that the code could do with a cleanup - the function is IMO doing too much stuff.