Flattens directories based on https://review.openstack.org/45487

Change-Id: If2b0f833dba4fed479390cc2d9315469d36e9c6d