Path manipulation issue in Python - likely broken API in Wine