Mine has been doing the same this week, he is around for months and he has now started doing it. I've done some research and I found mixed opinions, some saying it's ok, that they are looking for minerals they are missing, to get rid of parasites or just a bad habit, and some others saying it's dangerous. Apparently it's more usual than what we think, we have to keep an eye of course for impaction. I wouldn't think that a little dirt is going to cause major problems (as long as the soil is not fertilized of course) but large amounts or big lumps will definitely increase the chance of impaction.