Patched file extension manipulation errors with os splittext