What are the advantages and disadvantages to completing a Masters program before applying to a Ph. D program?
I can only speak for my (computer science) department.  Students who apply to our PhD program with MS degrees are held to a higher standard than applicants who apply as undergraduates.  What we look for in PhD applicants is strong evidence of research potential.  Most undergraduates don't have an opportunity to undertake a real research project, but MS students do have that opportunity, by definition.  It's much harder for MS applicants without publishable results to be admitted than an undergraduate in the same situation, all else being equal.  Grades are much less important (unless they suck, which yours don't).

On the other hand, the fact that your already decent grades improved when you started taking graduate classes is a huge point in your favor.  Be sure to get recommendation letters from your instructors in those courses, and hit them up for research opportunities.  I recommend applying to both MS and PhD programs; some departments will even let you apply for both simultaneously.

There's a similar effect in NSF's evaluations of graduate fellowship applications.  NSF splits the applicant pool into three piles based on the number of years of graduate education: still an undergrad, less than 12 months, and more than 12 months.  Expectations are higher for applicants in later piles.  In particular, publications are a de facto requirement for students in the more-than-one-year pile, even if their one year of graduate education was in a non-research masters program.