Added some directory assertion checks.