Police: Man slashed dog for barking