Implemented fallback methods for cython code.

Modified buildscript to fallback to pure python if building fails