Runtime fix for distance_cardinal

Adds a sanity check to distance_cardinal(). The proc it replaced used byond's get_dist() which preforms its own sanity check.