Include the magdir module in __init__ and update doc test in magdir