Fixed issues with habitat type demapping and updated to work under Py2.7/dendropy3