Avoid assertion error with Python executable when using a virtualenv

Fixes #22