Honestly, I'm going to go out on a limb and throw out my own postulation regarding the origins of the Masamune.
Within each FF story and universe, there always exists a set of legendary weapons that house phenomenal power. They're usually the same within the mythos of Final Fantasy. Ragnarok, Excalibur, the Assassin's Dagger, Yoichi's Bow, The Holy Lance, etc.
One of those consistent ultimate weapons is the Masamune. I think it's more than likely that during one of his SOLDIER missions, Sephiroth came upon the ancient sword while either exploring, or fighting a creature that held it. Where did it come from? Who the fuck knows. Where do all of the other ultimate weapons come from? Why was the Spirit Lance in a cave in Wutai? Why was Ultima WEAPON carrying around the Ultima WEAPON sword? Why was the Apocalypse in the Ancient Forest?
It just...was. I think that the Masamune is just one of the legendary ultimate weapons of FFVII and Sephiroth got his dirty hands on it.
The Buster Sword is a custom made, one of a kind sword. Who knows who built it, and what its made of, but it clearly is as strong as Sephiroth's sword, seeing as how it never cleaves it in two, like other weapons.
As for the Fusion Swords, they're definitely a custom job made for Cloud's specifications. The synergy they have with Cloud's fighting style, and his bike makes it very likely he commissioned them from the same person who made his bike, or someone familiar.