Fixes for python 3 (2 errors still left in tests)
Fix dshape constructor to accept unicode in python 2