Reinstate C _scandir module and fix variable name.

Hi Ben,

I do not know if it was your intention to keep the _scandir module disabled or not. It appears that 7176d19796a0ea723e9e35ad0d2ec6ddb24217e9 was meant to enable it.

I have attached two small changes to re-enable the module and make it compile on *nix platforms.

Please ignore this pull request if there is still work left to finish on the _scandir module.

Thanks