Fixed out-of-source build
Py3k compatible detection
Fixed undeclared memcpy error in esch.c