Beginning of the a function to check for directories. This is a non functioning update.