wouldn't it need to be
```return (path, os.path.splitext(filename)[0], os.path.splitext(filename)[1]) if filename else (path, '', '')``` for a 3-tuple?