Added new features to directory validation.