Port e4x to python

Closes #243
Add e4x option santization

This got lost during the pull request somehow.