small hackisch workaround for unicode problems with the picflash api

def punify_filename(filename):
    """
    small hackisch workaround for unicode problems with the picflash api
    """
    path, extension = splitext(filename)
    return path.encode('punycode').decode('utf8') + extension