So I'm a first year math PhD student. I did not get my masters before entering university, but I don't think that had a big role either for or against me. I didn't end up applying to any masters programs actually, and I had two major reasons:
the primary reason for me was money. None of the programs that I was interested in funded masters math programs. I'm sure that there are such programs, but school is expensive. And I'm poor. So it goes.
the secondary reason was inspiration. I'm going to do original research, right? That's the goal. And I'm impatient ad ready for it (at least in spirit). It happens to be the case that we spend our first year here doing a lot of work, quals, etc. It's the second year where things kick into gear, and I'm already straining for it. (However, if I already knew everything, I would have already passed my quals, so it's not unfair treatment or anything).
If I were to give you my personal recommendation, knowing that you wanted to get a math PhD eventually, then I would say apply to both if you are in doubt. What's the worst that can happen? If you are a strong enough candidate to go straight to PhD, then great. Why not, right? And if not, then a little graduate coursework can't hurt your application.
I would also like to mention that, at least in my program, there is no transferral of credits. You come in, pass qualifying exams, and write a dissertation. The transferral of credits would come in the form of you already knowing enough to pass the quals immediately (I did not know them all, for instance - some people knew more and some less). In all likelihood, you'd still burn at least a semester, more likely a year, just like all of us do. So a masters would likely lengthen your studies (at least at my uni).
On the other hand, it is possible that you don't have a big idea of what area of math, or what field of math in particular, you want to work in. This would be a big issue, perhaps. I knew I wanted to do number theory, and I was interested in the work of some of the number theorists at Brown. But a combinatorialist, graph theorist, or many other people would be hopelessly alone here (there is little love for combinatorics here). I suspect this sort of problem could be true in many schools. But if you know what you want to do, then this is no issue.
To end, I wanted to note that it's fine to test the waters, i.e. to see if you're fit for a math PhD, in a math PhD program. I've known people who have gotten a masters a year or two in, decided that was enough, and left the program. I suspect this isn't uncommon (although it would be uncommon where I am), and you'd get paid to do it.