fix display current path when navigating backward in folders

do not use static pointer in re-entrant function

clean up unused variable

Change-Id: I103f5de7561d1ffcdb6893f7a704ab906ee2b31d