Support for dirs with special chars (closes #3611)