Materials compendium fix

I rewrote large portions of the code to fix #610 - sorry, review-ers! On the bright side the actual code is much shorter now and, I think, a little easier to read/understand. However it's possible that there is something subtle in the old code I missed the second time around.

I added a quick test file to check if the output has the right compositions of materials, though I haven't checked the .h5 output. 
Can you use an `if sys.version_info[0] >2` check here instead of exceptions?