Attempt to solve Bug #2795. review @dinhviethoa

review @dinhviethoa 
Is there any way you could reuse _showRootDirectory() from spark.dart instead?
We'd like to use the same consistent code for the same functionality.
It usually helps to have one consistent code path that we can debug (instead of several).