realpath remove traling slash, so restore it