Without seeing your written lease it is difficult to answer many of your questions, as many of them will be answered by the lease provisions. Therefore, I suggest reviewing your lease. Nevertheless, "IF" your lease term runs until 8/1/13, typically a landlord must provide a notice of termination to prevent the lease from renewing for a new lease term. Regardless of whether your payments have been timely, a landlord can choose to not renew the lease, but he/she must follow the requirements set forth either in the lease or the landlord/tenant act.
Most leases do not permit a security deposit to be used for rent, so his request for August rent is probably justified.
I'm not certain where you are located; however, if you are in the mid-state, you are welcome to contact my office for an appointment to discuss the details of your situation.
Answered on Jul 15th, 2013 at 3:27 PM