fixed prepare_url to catch a ValueError thrown by urlparse, changed docs