KSE index ends up, rupee weakens