Added suport for directories as a parameter