If you email me your sandpile.sage file I could try to figure it out.
I made a file with a class definition inheriting from DiGraph and
everything tested OK, so I can't reproduce this. The only thing I can
think of is that perhaps your command "sage" is calling an older
version of sage that doesn't have DiGraphs - ? I don't know the graph
theory code well enough to know how likely that is.
Cheers,
Marshall