change null/undef folder references to empty string

fixes exception on path.join with node.js 0.10, which doesn't allow any
other args than strings.

Jira-issue: http://jira.webinos.org/browse/WP-980