Fix handling of ftp urls