How should a mathematics major choose between doing a Masters or PhD?
I'm not in mathematics so take my answer for what it is. 
The fact that you were turned down by 6 PhD programs suggests that your applications probably weren't too strong. Maybe you had bad grades, bad test scores, bad recommendations, etc. Or you simply overestimated your application strength and applied to schools beyond your reach (i.e. top 15 schools). 

Whatever it is, you need to overcome these shortcomings in your credentials. A Masters degree could be a great way to prove that you are grad school material, especially if you can demonstrate that you fit in academia by publishing article(s). This could be a jumping point to a decent PhD program. Generally, graduate programs would rather accept successful masters students over successful bachelors students, simply because good masters students already know the system and how to make it work.