filter null and "" in Path.join (closes #2709)