Add convertoldmagres.py script and oldmagres.py to library