I for one am not at all challenging your decision to change the locks (and recall I was once instructed by my attorney to do that) which I think is prudent: I would have done similar if I was in your shoes. I was simply expressing my own ignorance regarding the issue of subtracting the cost of doing so from a sec. dep., and that it might be useful to research that if you don't already have legal guidance on that subject, especially in your situation with regards to a difficult, aggressive, combative, and litigious individual such as your former roommate. There's the insuring of your physical and emotional protection (changing the locks) but also your legal protection (compliance with the statutes on allowable sec. dep. deductions).
Glad to hear that your locks are changed and you've regained the integrity of your home.