Adding directory support

Change-Id: Ia29f6aa4eab7e38875ad570153abd4d9d71be50f