<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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