Sometimes __file__ points to the .pyc file.

This fix the problem with the perl scripts.