Hello,
It is very simple. Just go to the Department of Immigration and Emigration (DIE - 115329302 -main phone - call and get the new address) and apply for an extension for 3 months. The cost is depending on what country you are from and they have a huge board with info. By the way you have to pay in Sri Lankan rupees. If you go there early in the morning by 8:30 am you can complete the process and go home with the extension, if not you will have to go back to collect your passport.
Good luck
Lynne