Två män döms till fängelse efter att ha brutit sig in hos en man i Orsa kommun och slagit honom i huvudet med en kofot.