added check to replace .pyc file with .py file as mainfile. fixes #60