[posixdirectory] added missing code

Thanks @Karlson2k for the heads up.