Efficient read of max_rank from binary files

Efficient read of max_rank from binary files by parsing the .npy format. Also, one little bugfix for unicode handling.

Limitations:

- I think this can only work for C-format arrays, not FORTRAN-format arrays. We should make sure the library only saves those.

- This will break if the .npy format changes in the future in some major way.