Update to ensure directory mode properly.

This actually seems to work so let's try it.