placing autopath after ifmain but at the top

This fixes the previous issue with autopath
and  still allows imports alex class.

I hope that I have not overlooked something else