refactor core output directory creation

also fix an oversight in the bsnes build