I can think of two ideas right know: 1) You compare the absolute values of the normal and choose the direction then. 2) You use vec_dot with the 3 default directions and take the direction which results in the biggest dot product.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual