Multiple Fixes:
  - DelegationError during tests
  - Removed useless replace
  - Use keys instead of cmp for sorting.
[TRAVIS] Run setup.py build before setup.py develop