Fixed a problem in node 0.10+

path.join() dies if an argument isn't a string
Backwards compatible with node 0.8