Fix an issue on extract with -p where empty dirs didn't get permissiosn.

The code that triggered the permission change is on directory change,
but we never `changed' to the directory if it was empty. We solve this
by calling nextdir() as soon as we make the directory (if it has children
they will always follow straight after).

Closes #49