Fixes to bayestar file i/o