How to proceed when graduate advisor treats me terribly, possibly because of age? I am an older graduate student who went back to school after getting laid off. 

Going back to school wasn't easy and I had to take some classes to prepare myself for graduate work. 

I had one professor who later became my graduate advisor and demonstrated a very harsh attitude toward me. For example, one class he taught was advanced statistical analysis which he did not use a book but used his own notes. I checked out a few books at the library to help with the subject. However, during a visit during his office hours I mentioned that I was using a book as well as his notes and he literally blew up at me. This wasn't the first nor the last time this happened. During one of the classes, he basically yelled at me and told me I was wrong when I answered one of his questions. But oddly, this seemed to back fire on him because another student rose his hand and asked why I was wrong? The professor then back-peddled immediately and stated that I was technically not wrong but would not explain further why I was wrong. As well, I have noticed that it seems that my grades are always marked down despite being equal work or better work than fellow students: I have compared solutions, quizzes, and exams numerous times. As well, to make things even harder during the second class I took with him, he called my cell phone at 10 PM on a Saturday and asked me, “What issues I had with him?” I felt this was completely unorthodox and weird. I replied I had none and even asked was there something in particular that I did to merit him calling me; he replied "no." 

I know this sounds weird but I really think he is biased against anyone who is over 35 year old. I have had one other older graduate student tell me that he treated him in a similar fashion. 

I currently have completed all required classes and electives but I need to finish my project to graduate. However, he is my project adviser. After much asking, he basically gave me the project late and I didn't finish on time. I am now into another semester. I now believe this is his weird attempt to play some final games with me in an effort to block me from graduating. 

I have become so frustrated that I want to leave the university. It is hard to deal with him and he is very nasty at times. 

I had a class with an associate professor who ended up leaving the university for full-time faculty position elsewhere. She never came out and said that this program wasn't good but she hinted that there are some better programs out there. I began to look around and actually found several that are about 35 minutes away that offer similar programs and may actually allow me to transfer with some credit. 

I need to get a better job and that MS on my resume would open a lot of doors. 

So I have several choices, I can either continue to try to work with a hostile university adviser or leave for another university. But if I transfer I will end up staying at the crummy job for about another 1.5 years. I would like to hear any suggestions. 

Update October 2019

Not to drudge up the past but the short of it is, I graduated and the university awarded my MS degree.

That professor whom I had issues with or had issues with me, ended up leaving the university. What I ended up doing was taking some of the advice that JeffE posted. I contacted the former professor I had a good report with, and asked for a reference. She basically asked me why I would want to leave the program when I had basically finished, and I explained to her what had happened. Apparently, she is still on good terms with the department chair and actually called him on my behalf. I then contacted him per her advice and he assigned me a new adviser; within about three/four months of that, I had my final work submitted, presented the results to the graduate board, and it was approved. I graduated following semester.
Don't walk. Run.

Your advisor's behavior is unfair, disrespectful, abusive, and deeply unprofessional.  Their behavior reflects horribly on the department, and since it's unlikely that you are the only victim, may undermine the value of your degree.

The moment the professor blew up at you for using another textbook, it would have been appropriate for you to walk out of his office/classroom without another word, drop the class, report his behavior  (both in writing and in person) to the department head, and find (and/or demand) a new thesis advisor.  Even now, I would recommend all of those responses.

If the department has your back, break all contact with your old advisor, finish the degree, and get out.  Block his phone number (but save his voice mails).  Reroute his emails to a separate folder (but don't delete them).  If he shows up at your office, ask him to leave; if he refuses, leave yourself; if he follows you, walk to the department chair's office.  In any case, document everything.

If the the department is unwilling or unable to help you separate from your abusive advisor and finish your degree, then the department is being abusive and unprofessional.  Again, since you are unlikely to be the only victim of this abuse, it will get out, and it will undermine the value of your degree.  Then your best choice is to leave the degree program, apply elsewhere, and try to transfer as much credit and research progress as possible.

I recommend contacting the associate professor who left to act as a potential reference, and for more general advice about how to proceed.  She knows the local political landscape far better than any random stranger on the internet.

Your age and educational background is not relevant here.  Your advisor's behavior is completely unacceptable, and you should not have to put up with it for even a second longer.  Get. Out. Now.