Fix directory stack popping when bootstrapping in Linux.