To get the library life upgrade whilst in sandwraith mode one must first get to the point where the Dahaka breaks through the wall. You then climb up onto the rafters like would normally and you should see a broken pillar somewhere on the Dahaka's right side (your left). Drop down onto this and you should end up right in front of the Dahaka. As long as you do not touch the Dahaka he will not hurt you. Now, you simply jump right across the gap in the floor and you should cling onto the next ledge which the Dahaka prevented you from. You then continue to proceed upwards and across to the balcony ledges. However, coming back, you need to be careful. It may appear that the Dahaka has disappeared but in reality he is still there so do NOT try to walk in through the hole but go back up onto the rafters and continue on like normal. Deviating from this path and going out the normal library exit may cause game ending glitches.