On line 101 of SpecialTwitterLogin.php the path is hardcoded as:
/* Save HTTP status for error dialog on connnect page.*/ header('Location: /wiki/Special:TwitterLogin');
It should probably look more like this (though I'm not sure this is correct either):
/* Save HTTP status for error dialog on connnect page.*/ header('Location: ' . $wgScriptPath . '/index.php/' . 'Special:TwitterLogin');