Posting as an answer, because it is too long for a comment; however, treat what follows as a 'comment', please.
I can only say what I'd do. I would go for the two year program, would try to impress people to obtain good recommendations, would learn as much as I could, would explore my interests, would try to work on some projects with some faculty member(s) (which would also help with exploring interests and obtaining good recommendations), and, assuming good academic standing, would try to apply to top schools.
Now, in the process, I would also explore my strengths and weaknesses on the emotional side. Let me clarify... We all work differently, are most productive under different circumstances and see our place in life differently. When you go for a PhD, as was mentioned above, you'll be on the clock, you'll be under pressure to write a dissertation and, if you're planning a career in academia, to write papers (and try to publish them), make connections with professionals in the field (mostly by attending conferences and dissipating your research results through talks), you'll be trying to impress people and so on. I would use my time in the masters program to explore my strengths and weaknesses in regards to all of the above (as much as possible, at least). For example: 'is mathematics really my thing?'; 'what kind of environment is best for me - a big, top ranking school or a smaller department?'; 'what can I do to be more productive?'; 'what inspires me (especially about math or some special field in math)?'
By working with a faculty member on a project, you can also ask and (more importantly!) try to answer questions like 'what kind of a relationship with my adviser should I expect in a 5 year program, and what should I look for in my adviser?' By developing closer ties with faculty members, you can have some of your questions answered by the faculty members, such as: 'what should I expect in a PhD program?'; 'given my interests, how should I choose the school for the PhD program?'; 'are there any faculty members in potential PhD departments that I can communicate with before I actually apply to the program (this can really help sometimes with your application and chance of acceptance)?'
Last but certainly not least, you'll be gaining a solid knowledge base (but, as implicitly implied above, you can only learn as much as you want to learn). You shouldn't look at it as "losing a year", since it may very well compensate for the first year or two in graduate school when you're studying to pass the qualifying exams. Speaking from personal experience: a year and a half in the masters program helped me to get done with all the formalities (qualifying exams, identifying field of interest, choosing adviser) by the beginning of my second year, and from the middle of my second year in the program I was actively reading papers and thinking about potential research problems.
Good luck with whatever you eventually choose to do!