Yes. You can most definitely take this case to court. What you first have to do is put the money that you otherwise would pay the landlord in rent into a separate bank account. So go to a local bank, take you august rent and deposit it into what is called an escrow account. Do the same for September. You need to hold on to and save that money to show a Court that you aren't a deadbeat and that you can pay. This shows a Court that your concerns about the living conditions is legitimate. I would then write the landlord and explain that you have put rent money in escrow and will be taking legal action if your concerns are not rectified.
If you need any extra advice or help in getting the letter done/going to court, please contact me offices: (610) 566-1006. Ask for Daniel Pallen.