Fix for "TypeError: Arguments to path.join must be strings" (node.js>=0.10.x)