How would having two nostrils be advantageous to your sense of smell or your ability to breath? I already hypothesized that either one of the nostrils could act as a back up for when another gets congested, but even then you can still breath through your mouth and at least for me I almost always have either both nostrils congested or neither at all.
There are two aspects to your question.
First, organisms have some kind of symmetry. The field of evolutionary developmental biology has some theories on why our anatomy is the way that it is. So, we have two eyes, two halves of our nose and two nostrils, one "tube" that becomes the path from our mouth to anus, etc. Our nostrils are just part of that symmetry. It may be evolutionary advantageous to keep two nostrils so that an animal can tell what direction a smell is coming from.
Second, we see that evolution has provided a path to having just one nostril. Blowholes in toothed whales are just one nostril. The other nostril does not have an opening to the outside of the whale. It would be interesting to explore the split between baleen (two nostrils) and toothed whales (one nostril). This evolutionary divergence may have been caused by differences in communication styles or the different blowholes may have caused a difference in communications http://www.whoi.edu/science/B/people/kamaral/marinemammalacoustics.html .
We have two nostrils for the same reason we have 2 ears and 2 eyes. Having 2 nostrils means an odor molecule coming from one direction will have higher concentration in one nostril than the other, so we can determine what direction the smell is coming from, and allows us to find food or avoid predators more effectively. While humans no longer rely on smell very much, our distant ancestors and relatives did. Moles provide an excellent example and recent research displays their "stereo smell" ability, http://news.nationalgeographic.com/news/2013/02/130205-moles-smell-stereo-animals-weird-science/
And nostrils aren't the only example of smelling in directions, insects have 2 antenna, which are their scent organs. Moths can follow a pheromone trail using their antenna with great accuracy.
So why do humans still have two nostrils despite not needing to smell in stereo? There just hasn't been any evolutionary pressure to move towards 1 nostril. In fact, there would probably be pressure against it, because a human with 1 big hole in the middle of his face probably won't get a lot of dates.
Also, not all cetaceans have a single blowhole. Gray whales have 2 nostrils, and sperm whales have a vestigial second nostril that doesn't reach the surface. http://en.wikipedia.org/wiki/Blowhole_%28anatomy%29
The position of the blowhole is interesting because it's on the top of the head, above the eyes. Rarely, other animals will be born with a disorder called cyclopia, where they have 1 eye in the middle of the face. They usually don't live very long at all, but their nose doesn't develop right either, if it develops at all it shows up above the eye, and is often a proboscis instead of a nose.http://en.wikipedia.org/wiki/Cyclopia
Whales must have developed a way to keep the nose above the eyes while not messing anything else up.
I remember something from the anatomy lecture saying that one nostril picks up one, the other other kinds of molecules depending of the molecule's size and other attributes. Meaning speed is important: if you breathe in through the nose right now, you'll probably feel the air coming in faster from one side than the other. And still if i remember correctly this blocking of one side is achieved by blood vessels getting bigger. The choice which one of the airways is blocked more comes from daily rhythms similar to sleep cycles.