fix unicode issues for values loaded from 'backends' config file
urllib.quote works only with str, not unicode
don't crash when quantities are >999