Fixed handing of dirs in export.
Merge branch 'test' into dev