fixed getrealpath wrong bug