load bases with $dir as well.