Add support for multiple alternative paths

ps: I've never done anything with node before, so let me know anything you think could be node-style.