Bounds check directories.