Drop support for Python 2.6
Fix regression on extends directive, add tests